Skip to main content

Class SKSurface

Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll

public sealed class SKSurface : IDisposable

Inheritance​

object ← SKSurface

Implements​

IDisposable

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties​

Canvas​

public SKCanvas Canvas { get; }

Property Value​

SKCanvas

Info​

public SKImageInfo Info { get; }

Property Value​

SKImageInfo

IsWrappedScene​

public bool IsWrappedScene { get; }

Property Value​

bool

Scene​

public Scene Scene { get; }

Property Value​

Scene

Methods​

Create(SKImageInfo)​

public static SKSurface Create(SKImageInfo info)

Parameters​

info SKImageInfo

Returns​

SKSurface

Create(Scene, SKImageInfo, Matrix3x2)​

public static SKSurface Create(Scene scene, SKImageInfo info, Matrix3x2 initialTransform)

Parameters​

scene Scene

info SKImageInfo

initialTransform Matrix3x2

Returns​

SKSurface

Create(SKImageInfo, SKSurfaceProperties)​

public static SKSurface Create(SKImageInfo info, SKSurfaceProperties properties)

Parameters​

info SKImageInfo

properties SKSurfaceProperties

Returns​

SKSurface

Create(GRContext, bool, SKImageInfo)​

public static SKSurface Create(GRContext context, bool budgeted, SKImageInfo info)

Parameters​

context GRContext

budgeted bool

info SKImageInfo

Returns​

SKSurface

Create(GRContext, bool, SKImageInfo, SKSurfaceProperties)​

public static SKSurface Create(GRContext context, bool budgeted, SKImageInfo info, SKSurfaceProperties properties)

Parameters​

context GRContext

budgeted bool

info SKImageInfo

properties SKSurfaceProperties

Returns​

SKSurface

Create(GRContext, SKImageInfo, SurfaceHandle)​

public static SKSurface Create(GRContext context, SKImageInfo info, SurfaceHandle surfaceHandle)

Parameters​

context GRContext

info SKImageInfo

surfaceHandle SurfaceHandle

Returns​

SKSurface

Create(GRContext, SKImageInfo, SurfaceHandle, int)​

public static SKSurface Create(GRContext context, SKImageInfo info, SurfaceHandle surfaceHandle, int sampleCount)

Parameters​

context GRContext

info SKImageInfo

surfaceHandle SurfaceHandle

sampleCount int

Returns​

SKSurface

Create(GRContext, SKImageInfo, SurfaceHandle, int, SKSurfaceProperties?)​

public static SKSurface Create(GRContext context, SKImageInfo info, SurfaceHandle surfaceHandle, int sampleCount, SKSurfaceProperties? properties)

Parameters​

context GRContext

info SKImageInfo

surfaceHandle SurfaceHandle

sampleCount int

properties SKSurfaceProperties?

Returns​

SKSurface

Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType)​

public static SKSurface Create(GRContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType)

Parameters​

context GRContext

renderTarget GRBackendRenderTarget

origin GRSurfaceOrigin

colorType SKColorType

Returns​

SKSurface

Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties?)​

public static SKSurface Create(GRContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKSurfaceProperties? props)

Parameters​

context GRContext

renderTarget GRBackendRenderTarget

origin GRSurfaceOrigin

colorType SKColorType

props SKSurfaceProperties?

Returns​

SKSurface

Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace?)​

public static SKSurface Create(GRContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKColorSpace? colorspace)

Parameters​

context GRContext

renderTarget GRBackendRenderTarget

origin GRSurfaceOrigin

colorType SKColorType

colorspace SKColorSpace?

Returns​

SKSurface

Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace?, SKSurfaceProperties?)​

public static SKSurface Create(GRContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKColorSpace? colorspace, SKSurfaceProperties? props)

Parameters​

context GRContext

renderTarget GRBackendRenderTarget

origin GRSurfaceOrigin

colorType SKColorType

colorspace SKColorSpace?

props SKSurfaceProperties?

Returns​

SKSurface

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)​

public static SKSurface Create(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType)

Parameters​

context GRContext

texture GRBackendTexture

origin GRSurfaceOrigin

colorType SKColorType

Returns​

SKSurface

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKSurfaceProperties?)​

public static SKSurface Create(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKSurfaceProperties? props)

Parameters​

context GRContext

texture GRBackendTexture

origin GRSurfaceOrigin

colorType SKColorType

props SKSurfaceProperties?

Returns​

SKSurface

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType)​

public static SKSurface Create(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType)

Parameters​

context GRContext

texture GRBackendTexture

origin GRSurfaceOrigin

sampleCount int

colorType SKColorType

Returns​

SKSurface

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType, SKColorSpace?)​

public static SKSurface Create(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace? colorspace)

Parameters​

context GRContext

texture GRBackendTexture

origin GRSurfaceOrigin

sampleCount int

colorType SKColorType

colorspace SKColorSpace?

Returns​

SKSurface

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType, SKColorSpace?, SKSurfaceProperties?)​

public static SKSurface Create(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace? colorspace, SKSurfaceProperties? props)

Parameters​

context GRContext

texture GRBackendTexture

origin GRSurfaceOrigin

sampleCount int

colorType SKColorType

colorspace SKColorSpace?

props SKSurfaceProperties?

Returns​

SKSurface

Create(SKImageInfo, nint, int)​

public static SKSurface Create(SKImageInfo info, nint pixels, int rowBytes)

Parameters​

info SKImageInfo

pixels nint

rowBytes int

Returns​

SKSurface

Create(SKImageInfo, nint, int, SKSurfaceProperties?)​

public static SKSurface Create(SKImageInfo info, nint pixels, int rowBytes, SKSurfaceProperties? properties)

Parameters​

info SKImageInfo

pixels nint

rowBytes int

properties SKSurfaceProperties?

Returns​

SKSurface

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Draw(SKCanvas, float, float, SKPaint?)​

public void Draw(SKCanvas canvas, float x, float y, SKPaint? paint)

Parameters​

canvas SKCanvas

x float

y float

paint SKPaint?

Flush()​

public void Flush()

Flush(bool, bool)​

public void Flush(bool submit, bool synchronous = false)

Parameters​

submit bool

synchronous bool

Snapshot()​

public SKImage Snapshot()

Returns​

SKImage