Edit

SKMetalView Class

Definition

A hardware-accelerated view that uses Metal to render SkiaSharp drawings.

[Foundation.Register("SKMetalView")]
public class SKMetalView : MetalKit.MTKView, IDisposable, MetalKit.IMTKViewDelegate, System.ComponentModel.IComponent
Inheritance
SKMetalView
Attributes
Implements

Remarks

This view uses the Metal graphics API to provide GPU-accelerated rendering of SkiaSharp content on macOS.

Constructors

Name Description
SKMetalView()

Initializes a new instance of the SKMetalView class with a zero-sized frame.

SKMetalView(CGRect, IMTLDevice)

Initializes a new instance of the SKMetalView class with the specified frame and Metal device.

SKMetalView(CGRect)

Initializes a new instance of the SKMetalView class 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 in pixels.

GRContext

Gets the GPU context used for drawing operations.

Methods

Name Description
AwakeFromNib()

Called when the view has been loaded from a storyboard or XIB file.

OnPaintSurface(SKPaintMetalSurfaceEventArgs)

Raises the PaintSurface event.

Events

Name Description
PaintSurface

Occurs when the view needs to be painted.

Explicit Interface Implementations

Name Description
IMTKViewDelegate.Draw(MTKView)

Called when the view needs to render its content.

IMTKViewDelegate.DrawableSizeWillChange(MTKView, CGSize)

Called when the drawable size of the view is about to change.

Applies to