SkiaSharp.Views.Mac.SKCanvasView.PaintSurface Event

Occurs when the the canvas needs to be re-drawn.


public event EventHandler<SKPaintSurfaceEventArgs> PaintSurface


There are two ways to draw on this surface: by overriding the SKCanvasView.DrawInSurface method, or by attaching a handler to the SKCanvasView.PaintSurface event.

C# Example

SKCanvasView myView = ...;

myView.PaintSurface += (sender, e) => {
    var surface = e.Surface;
    var surfaceWidth = e.Info.Width;
    var surfaceHeight = e.Info.Height;

    var canvas = surface.Canvas;
    // draw on the canvas
    canvas.Flush ();


Namespace: SkiaSharp.Views.Mac
Assembly: SkiaSharp.Views.Mac (in SkiaSharp.Views.Mac.dll)
Assembly Versions:,,,,