SKCanvasView Class
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.
A view that can be drawn on using SkiaSharp drawing commands.
public class SKCanvasView : Android.Views.View
- Inheritance
-
SKCanvasView
Constructors
| Name | Description |
|---|---|
| SKCanvasView(Context, IAttributeSet, Int32) |
Initializes a new instance of the SKCanvasView class with the specified XML attributes and style. |
| SKCanvasView(Context, IAttributeSet) |
Initializes a new instance of the SKCanvasView class with the specified XML attributes. |
| SKCanvasView(Context) |
Initializes a new instance of the SKCanvasView class. |
| SKCanvasView(IntPtr, JniHandleOwnership) |
Initializes a new instance of the SKCanvasView class from a JNI object reference. |
Properties
| Name | Description |
|---|---|
| CanvasSize |
Gets the current canvas size. |
| IgnorePixelScaling |
Gets or sets a value indicating whether the drawing canvas should be resized on high resolution displays. |
Methods
| Name | Description |
|---|---|
| Dispose(Boolean) |
Releases the unmanaged resources used by the SKCanvasView and optionally releases the managed resources. |
| OnAttachedToWindow() |
Called when the view is attached to a window. |
| OnDetachedFromWindow() |
This is called when the view is detached from a window. |
| OnDraw(Canvas) |
Implement this to do your drawing. |
| OnDraw(SKSurface, SKImageInfo) |
Obsolete.
Implement this to draw on the canvas. |
| OnPaintSurface(SKPaintSurfaceEventArgs) |
Implement this to draw on the canvas. |
| OnSizeChanged(Int32, Int32, Int32, Int32) |
This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0. |
Events
| Name | Description |
|---|---|
| PaintSurface |
Occurs when the canvas needs to be redrawn. |