ISKGLView Interface
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.
Defines the interface for a GPU-accelerated SkiaSharp view in .NET MAUI.
public interface ISKGLView : Microsoft.Maui.IView
- Derived
- Implements
Remarks
This interface is implemented by SKGLView and used by platform-specific handlers to communicate between the cross-platform view and native GPU-backed views. The GPU backend varies by platform: OpenGL ES on Android, Metal on Mac Catalyst, and DirectX via ANGLE on Windows.
Properties
| Name | Description |
|---|---|
| CanvasSize |
Gets the current size of the canvas in pixels. |
| EnableTouchEvents |
Gets a value indicating whether touch events are enabled for this view. |
| GRContext |
Gets the GPU context used for rendering. |
| HasRenderLoop |
Gets a value indicating whether the view uses a continuous render loop. |
| IgnorePixelScaling |
Gets a value indicating whether the drawing canvas should ignore the physical pixel density. |
Methods
| Name | Description |
|---|---|
| InvalidateSurface() |
Invalidates the surface, causing a redraw. |
| OnCanvasSizeChanged(SKSizeI) |
Called by the handler when the canvas size changes. |
| OnGRContextChanged(GRContext) |
Called by the handler when the GPU context changes. |
| OnPaintSurface(SKPaintGLSurfaceEventArgs) |
Called by the handler when the surface needs to be painted. |
| OnTouch(SKTouchEventArgs) |
Called by the handler when a touch event occurs. |