Esempio n. 1
0
 private void DrawAdditionals(SKCanvas canvas, bool beforeBorders)
 {
     try
     {
         foreach (CanvasDrawable d in AdditionalDrawables.ToList())
         {
             if (d == null)
             {
                 continue;
             }
             if (d.BeforeBorders == beforeBorders)
             {
                 var transform = SKMatrix.CreateScaleTranslation(zoom, zoom, -shift_x * zoom, -shift_y * zoom);
                 d.Render(canvas, transform);
             }
         }
     }
     catch {} // happens mostly when AdditionalDrawables is modified during a render pass. This triggers a redraw anyway, so let's ignore it
 }