SKCanvasView.OnDrawFrame Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| OnDrawFrame() |
Implemented by derived CustomRenderingView types to draw the next frame or paint the control. |
| OnDrawFrame(SKPaintSurfaceEventArgs) |
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(SKPaintSurfaceEventArgs)
Implement this to draw on the canvas.
protected virtual void OnDrawFrame(SkiaSharp.Views.Tizen.SKPaintSurfaceEventArgs e);
Parameters
The event arguments that contain the drawing surface and information.
Examples
protected override void OnPaintSurface (SKPaintSurfaceEventArgs e)
{
// call the base method
base.OnPaintSurface (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 ();
}
Remarks
There are two ways to draw on this surface: by overriding the OnDrawFrame(SKPaintSurfaceEventArgs) 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.