SKSurfaceView Class

Definition

An implementation of SurfaceView that uses the dedicated surface for displaying a hardware-accelerated SKSurface.

C#
public class SKSurfaceView : Android.Views.SurfaceView, Android.Views.ISurfaceHolderCallback, IDisposable
C#
public class SKSurfaceView : Android.Views.SurfaceView, Android.Views.ISurfaceHolderCallback, IDisposable, Java.Interop.IJavaPeerable
Inheritance
SKSurfaceView
Implements

Constructors

SKSurfaceView(Context, IAttributeSet, Int32)

Perform inflation from XML and apply a class-specific base style from a theme attribute.

SKSurfaceView(Context, IAttributeSet)

Constructor that is called when inflating a SKSurfaceView from XML.

SKSurfaceView(Context)

Simple constructor to use when creating a SKSurfaceView from code.

Properties

CanvasSize

Gets the current canvas size.

Methods

Dispose(Boolean)

Releases the unmanaged resources used by the SKSurfaceView and optionally releases the managed resources.

LockSurface()

Start editing the pixels in the surface. The returned SKLockedSurface can be used to get the surface for drawing into the surface's bitmap.

SurfaceChanged(ISurfaceHolder, Format, Int32, Int32)

This is called immediately after any structural changes (format or size) have been made to the surface.

SurfaceCreated(ISurfaceHolder)

This is called immediately after the surface is first created

SurfaceDestroyed(ISurfaceHolder)

This is called immediately before a surface is being destroyed

UnlockSurfaceAndPost(SKLockedSurface)

Finish editing pixels in the surface. After this call, the surface's current pixels will be shown on the screen, but its content is lost.

Applies to

Tuote Versiot
SkiaSharp Views 1.60.x, 1.68.x, 2.80.x, 2.88.x