public void DrawOnGraphics(Graphics graphics, CanvasDelegate canvasDelegate) { if (Initialized == false) { return; } CopyFromGraphics(graphics); using (SKBitmap bitmap = new SKBitmap(Size.Width, Size.Height)) { using (SKCanvas canvas = new SKCanvas(bitmap)) { canvasDelegate(canvas); Skia_Canvas.DrawBitmap(bitmap, new SKRect(0, 0, Size.Width, Size.Height)); CopyToGraphics(graphics); } } }
void ReleaseDesignerOutlets() { if (imageView != null) { imageView.Dispose(); imageView = null; } if (progressIndicator != null) { progressIndicator.Dispose(); progressIndicator = null; } if (CanvasDelegate != null) { CanvasDelegate.Dispose(); CanvasDelegate = null; } }