Edit

SKGLSurfaceView.OnDrawFrame Method

Definition

Overloads

Name Description
OnDrawFrame()

Implemented by derived CustomRenderingView types to draw the next frame or paint the control.

OnDrawFrame(SKPaintGLSurfaceEventArgs)

Implement this to draw on the canvas.

OnDrawFrame()

Implemented by derived CustomRenderingView types to draw the next frame or paint the control.

protected override sealed void OnDrawFrame();

Applies to

OnDrawFrame(SKPaintGLSurfaceEventArgs)

Implement this to draw on the canvas.

protected virtual void OnDrawFrame(SkiaSharp.Views.Tizen.SKPaintGLSurfaceEventArgs e);

Parameters

e
SKPaintGLSurfaceEventArgs

The event arguments that contain the drawing surface and information.

Examples

protected override void OnDrawFrame (SKPaintGLSurfaceEventArgs e)
{
    // call the base method
    base.OnPaintSurface (e);

    var surface = e.Surface;
    var surfaceWidth = e.BackendRenderTarget.Width;
    var surfaceHeight = e.BackendRenderTarget.Height;

    var canvas = surface.Canvas;

    // draw on the canvas

    canvas.Flush ();
}

Remarks

There are two ways to draw on this surface: by overriding the OnDrawFrame(SKPaintGLSurfaceEventArgs) method, or by attaching a handler to the PaintSurface event.

Important

If this method is overridden, then the base must be called, otherwise the event will not be fired.

Applies to