SKMetalView 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 hardware-accelerated view that uses Metal to render SkiaSharp drawing commands.
[Foundation.Register("SKMetalView")]
public class SKMetalView : MetalKit.MTKView, IDisposable, MetalKit.IMTKViewDelegate, System.ComponentModel.IComponent
- Inheritance
-
SKMetalView
- Attributes
- Implements
Remarks
This view provides the best performance on iOS devices that support Metal. For devices that do not support Metal, use SKCanvasView instead.
Constructors
| Name | Description |
|---|---|
| SKMetalView() |
Initializes a new instance of the SKMetalView class. |
| SKMetalView(CGRect, IMTLDevice) |
Initializes the SKMetalView with the specified frame and Metal device. |
| SKMetalView(CGRect) |
Initializes the SKMetalView with the specified frame. |
| SKMetalView(IntPtr) |
Initializes a new instance of the SKMetalView class from a native handle. |
Properties
| Name | Description |
|---|---|
| CanvasSize |
Gets the current canvas size. |
| GRContext |
Gets the current GPU context. |
Methods
| Name | Description |
|---|---|
| AwakeFromNib() |
Called after the object has been loaded from the nib file. Overriders must call the base method. |
| OnPaintSurface(SKPaintMetalSurfaceEventArgs) |
Implement this to draw on the canvas. |
Events
| Name | Description |
|---|---|
| PaintSurface |
Occurs when the surface needs to be redrawn. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IMTKViewDelegate.Draw(MTKView) |
Implements the IMTKViewDelegate.Draw method to render the SkiaSharp content. |
| IMTKViewDelegate.DrawableSizeWillChange(MTKView, CGSize) |
Implements the IMTKViewDelegate.DrawableSizeWillChange method to handle size changes. |