編輯

共用方式為


SKSurface.Create Method

Definition

Overloads

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType)
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKSurfaceProperties)
Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties)
Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace)
Create(GRContext, Boolean, SKImageInfo, Int32, SKSurfaceProps)
Obsolete.

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType)

Wraps a pre-existing backend 3D API texture as a surface.

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

Wraps a pre-existing backend 3D API texture as a surface.

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

Wraps a pre-existing backend 3D API render target as a surface.

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

Wraps a pre-existing backend 3D API render target as a surface.

Create(Int32, Int32, SKColorType, SKAlphaType)
Obsolete.

Creates a new surface with the specified image parameters.

Create(SKImageInfo, IntPtr, Int32, SKSurfaceProps)
Obsolete.

Creates a new surface from the specified image parameters, the provided buffer and surface properties.

Create(SKImageInfo, IntPtr, Int32, SKSurfaceProperties)

Creates a new surface from the specified image parameters, the provided buffer and surface properties.

Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin)
Create(GRRecordingContext, Boolean, SKImageInfo, Int32, SKSurfaceProperties)
Create(SKImageInfo, IntPtr, Int32, SKSurfaceReleaseDelegate, Object)

Creates a new surface with the specified image parameters using a provided buffer.

Create(Int32, Int32, SKColorType, SKAlphaType, SKSurfaceProps)
Obsolete.

Creates a new surface with the specified image parameters and surface properties.

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

Wraps a pre-existing backend 3D API render target as a surface.

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace)

Wraps a pre-existing backend 3D API texture as a surface.

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKSurfaceProperties)

Wraps a pre-existing backend 3D API texture as a surface.

Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace, SKSurfaceProperties)
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace)
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKSurfaceProperties)
Create(SKImageInfo, IntPtr, Int32, SKSurfaceReleaseDelegate, Object, SKSurfaceProperties)

Creates a new surface with the specified image parameters using a provided buffer.

Create(Int32, Int32, SKColorType, SKAlphaType, IntPtr, Int32)
Obsolete.

Creates a new surface with the specified image parameters using a provided buffer.

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace, SKSurfaceProperties)

Wraps a pre-existing backend 3D API texture as a surface.

Create(GRContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin, SKSurfaceProperties, Boolean)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace, SKSurfaceProperties)
Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin, SKSurfaceProperties, Boolean)
Create(Int32, Int32, SKColorType, SKAlphaType, IntPtr, Int32, SKSurfaceProps)
Obsolete.

Creates a new surface with the specified image parameters using a provided buffer and surface properties.

Create(GRRecordingContext, Boolean, SKImageInfo, Int32)
Create(GRRecordingContext, Boolean, SKImageInfo, SKSurfaceProperties)
Create(GRContext, Boolean, SKImageInfo, Int32, SKSurfaceProperties)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)
Create(GRContext, GRBackendTexture, SKColorType)

Wraps a pre-existing 3D API texture as a surface.

Create(GRContext, GRBackendRenderTargetDesc, SKSurfaceProps)
Obsolete.

Wraps a pre-existing 3D API render target as a surface.

Create(GRContext, GRBackendRenderTarget, SKColorType)

Wraps a pre-existing 3D API render target as a surface.

Create(SKPixmap, SKSurfaceProps)
Obsolete.

Creates a new surface with the specified pixmap and surface properties.

Create(SKPixmap, SKSurfaceProperties)

Creates a new surface with the specified pixmap and surface properties.

Create(SKImageInfo, IntPtr)

Creates a new surface with the specified image parameters using a provided buffer.

Create(GRContext, GRBackendTextureDesc, SKSurfaceProps)
Obsolete.

Wraps a pre-existing 3D API texture as a surface.

Create(SKImageInfo, Int32)

Creates a new surface from the specified image parameters.

Create(SKImageInfo, SKSurfaceProperties)

Creates a new surface from the specified image parameters and surface properties.

Create(GRRecordingContext, GRBackendTexture, SKColorType, SKSurfaceProperties)
Create(GRContext, GRBackendTextureDesc)
Obsolete.

Wraps a pre-existing 3D API texture as a surface.

Create(GRContext, GRBackendRenderTargetDesc)
Obsolete.

Wraps a pre-existing 3D API render target as a surface.

Create(SKPixmap)

Creates a new surface with the specified pixmap.

Create(SKImageInfo)

Creates a new surface with the specified image parameters.

Create(SKImageInfo, SKSurfaceProps)
Obsolete.

Creates a new surface from the specified image parameters and surface properties.

Create(GRContext, GRGlBackendTextureDesc, SKSurfaceProps)
Obsolete.

Wraps a pre-existing OpenGL texture as a surface.

Create(GRContext, GRGlBackendTextureDesc)
Obsolete.

Wraps a pre-existing OpenGL texture as a surface.

Create(GRRecordingContext, GRBackendRenderTarget, SKColorType)
Create(GRRecordingContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties)
Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType)
Create(GRContext, Boolean, SKImageInfo, Int32)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRContext, Boolean, SKImageInfo, SKSurfaceProperties)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRContext, Boolean, SKImageInfo)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)

Wraps a pre-existing backend 3D API texture as a surface.

Create(GRContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties)

Wraps a pre-existing backend 3D API render target as a surface.

Create(GRContext, GRBackendTexture, SKColorType, SKSurfaceProperties)

Wraps a pre-existing backend 3D API texture as a surface.

Create(SKImageInfo, IntPtr, Int32)

Creates a new surface with the specified image parameters using a provided buffer.

Create(SKImageInfo, IntPtr, SKSurfaceProperties)

Creates a new surface from the specified image parameters and surface properties.

Create(SKImageInfo, Int32, SKSurfaceProperties)

Creates a new surface from the specified image parameters and surface properties.

Create(GRRecordingContext, Boolean, SKImageInfo)
Create(GRRecordingContext, GRBackendTexture, SKColorType)
Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType)

Wraps a pre-existing backend 3D API render target as a surface.

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType);

Parameters

sampleCount
Int32
colorType
SKColorType

Returns

Applies to

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

colorType
SKColorType

Returns

Applies to

Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

renderTarget
GRBackendRenderTarget
colorType
SKColorType

Returns

Applies to

Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace);

Parameters

renderTarget
GRBackendRenderTarget
colorType
SKColorType
colorspace
SKColorSpace

Returns

Applies to

Create(GRContext, Boolean, SKImageInfo, Int32, SKSurfaceProps)

Caution

Use Create(GRContext, bool, SKImageInfo, int, SKSurfaceProperties) instead.

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(GRContext, bool, SKImageInfo, int, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.SKSurfaceProps props);

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

sampleCount
Int32

The number of samples.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.GRSurfaceOrigin origin);

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

sampleCount
Int32

The number of samples per pixel.

origin
GRSurfaceOrigin

The origin of the texture.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType)

Wraps a pre-existing backend 3D API texture as a surface.

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

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

origin
GRSurfaceOrigin

The origin of the texture.

sampleCount
Int32

The number of samples per pixel.

colorType
SKColorType

The color type to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

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

Wraps a pre-existing backend 3D API texture as a surface.

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

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

origin
GRSurfaceOrigin

The origin of the texture.

colorType
SKColorType

The color type to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

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

Wraps a pre-existing backend 3D API render target as a surface.

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

Parameters

context
GRContext

The graphics context.

renderTarget
GRBackendRenderTarget

The description of the existing render target.

origin
GRSurfaceOrigin

The origin of the texture.

colorType
SKColorType

The color type to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

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

Wraps a pre-existing backend 3D API render target as a surface.

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

Parameters

context
GRContext

The graphics context.

renderTarget
GRBackendRenderTarget

The description of the existing render target.

origin
GRSurfaceOrigin

The origin of the texture.

colorType
SKColorType

The color type to use for the surface.

colorspace
SKColorSpace

The colorspace to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(Int32, Int32, SKColorType, SKAlphaType)

Caution

Use Create(SKImageInfo) instead.

Creates a new surface with the specified image parameters.

public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType);
[System.Obsolete("Use Create(SKImageInfo) instead.")]
public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType);

Parameters

width
Int32

The desired width for the surface.

height
Int32

The desired height for the surface.

colorType
SKColorType

The color type to use for the surface.

alphaType
SKAlphaType

The transparency mode to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Remarks

This will create a buffer that will be backend by the in-memory buffer.

Applies to

Create(SKImageInfo, IntPtr, Int32, SKSurfaceProps)

Caution

Use Create(SKImageInfo, IntPtr, rowBytes, SKSurfaceProperties) instead.

Creates a new surface from the specified image parameters, the provided buffer and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(SKImageInfo, IntPtr, rowBytes, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceProps props);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Remarks

This will create a buffer that will be backend by the in-memory buffer provided in pixels.

Applies to

Create(SKImageInfo, IntPtr, Int32, SKSurfaceProperties)

Creates a new surface from the specified image parameters, the provided buffer and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceProperties props);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer that will be backend by the in-memory buffer provided in pixels.

Applies to

Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.GRSurfaceOrigin origin);

Parameters

budgeted
Boolean
sampleCount
Int32

Returns

Applies to

Create(GRRecordingContext, Boolean, SKImageInfo, Int32, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.SKSurfaceProperties props);

Parameters

budgeted
Boolean
sampleCount
Int32

Returns

Applies to

Create(SKImageInfo, IntPtr, Int32, SKSurfaceReleaseDelegate, Object)

Creates a new surface with the specified image parameters using a provided buffer.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceReleaseDelegate releaseProc, object context);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

releaseProc
SKSurfaceReleaseDelegate

The delegate to invoke when the surface is about to be disposed.

context
Object

The user data to use when invoking the delegate.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(Int32, Int32, SKColorType, SKAlphaType, SKSurfaceProps)

Caution

Use Create(SKImageInfo, SKSurfaceProperties) instead.

Creates a new surface with the specified image parameters and surface properties.

public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(SKImageInfo, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType, SkiaSharp.SKSurfaceProps props);

Parameters

width
Int32

The desired width for the surface.

height
Int32

The desired height for the surface.

colorType
SKColorType

The color type to use for the surface.

alphaType
SKAlphaType

The transparency mode to use for the surface.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

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

Wraps a pre-existing backend 3D API render target as a surface.

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

Parameters

context
GRContext

The graphics context.

renderTarget
GRBackendRenderTarget

The description of the existing render target.

origin
GRSurfaceOrigin

The origin of the texture.

colorType
SKColorType

The color type to use for the surface.

colorspace
SKColorSpace

The colorspace to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace)

Wraps a pre-existing backend 3D API texture as a surface.

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

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

origin
GRSurfaceOrigin

The origin of the texture.

sampleCount
Int32

The number of samples per pixel.

colorType
SKColorType

The color type to use for the surface.

colorspace
SKColorSpace

The colorspace to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKSurfaceProperties)

Wraps a pre-existing backend 3D API texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

origin
GRSurfaceOrigin

The origin of the texture.

sampleCount
Int32

The number of samples per pixel.

colorType
SKColorType

The color type to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKSurfaceProperties props);

Parameters

renderTarget
GRBackendRenderTarget
colorType
SKColorType
colorspace
SKColorSpace

Returns

Applies to

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace);

Parameters

sampleCount
Int32
colorType
SKColorType
colorspace
SKColorSpace

Returns

Applies to

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

sampleCount
Int32
colorType
SKColorType

Returns

Applies to

Create(SKImageInfo, IntPtr, Int32, SKSurfaceReleaseDelegate, Object, SKSurfaceProperties)

Creates a new surface with the specified image parameters using a provided buffer.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceReleaseDelegate releaseProc, object context, SkiaSharp.SKSurfaceProperties props);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

releaseProc
SKSurfaceReleaseDelegate

The delegate to invoke when the surface is about to be disposed.

context
Object

The user data to use when invoking the delegate.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(Int32, Int32, SKColorType, SKAlphaType, IntPtr, Int32)

Caution

Use Create(SKImageInfo, IntPtr, int) instead.

Creates a new surface with the specified image parameters using a provided buffer.

public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType, IntPtr pixels, int rowBytes);
[System.Obsolete("Use Create(SKImageInfo, IntPtr, int) instead.")]
public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType, IntPtr pixels, int rowBytes);

Parameters

width
Int32

The desired width for the surface.

height
Int32

The desired height for the surface.

colorType
SKColorType

The color type to use for the surface.

alphaType
SKAlphaType

The transparency mode to use for the surface.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace, SKSurfaceProperties)

Wraps a pre-existing backend 3D API texture as a surface.

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

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

origin
GRSurfaceOrigin

The origin of the texture.

sampleCount
Int32

The number of samples per pixel.

colorType
SKColorType

The color type to use for the surface.

colorspace
SKColorSpace

The colorspace to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin, SKSurfaceProperties, Boolean)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKSurfaceProperties props, bool shouldCreateWithMips);

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

sampleCount
Int32

The number of samples per pixel.

origin
GRSurfaceOrigin

The origin of the texture.

props
SKSurfaceProperties

The surface property configuration.

shouldCreateWithMips
Boolean

A hint that the surface will host mip map images.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKSurfaceProperties props);

Parameters

sampleCount
Int32
colorType
SKColorType
colorspace
SKColorSpace

Returns

Applies to

Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin, SKSurfaceProperties, Boolean)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKSurfaceProperties props, bool shouldCreateWithMips);

Parameters

budgeted
Boolean
sampleCount
Int32
shouldCreateWithMips
Boolean

Returns

Applies to

Create(Int32, Int32, SKColorType, SKAlphaType, IntPtr, Int32, SKSurfaceProps)

Caution

Use Create(SKImageInfo, IntPtr, int, SKSurfaceProperties) instead.

Creates a new surface with the specified image parameters using a provided buffer and surface properties.

public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(SKImageInfo, IntPtr, int, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (int width, int height, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alphaType, IntPtr pixels, int rowBytes, SkiaSharp.SKSurfaceProps props);

Parameters

width
Int32

The desired width for the surface.

height
Int32

The desired height for the surface.

colorType
SKColorType

The color type to use for the surface.

alphaType
SKAlphaType

The transparency mode to use for the surface.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRRecordingContext, Boolean, SKImageInfo, Int32)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount);

Parameters

budgeted
Boolean
sampleCount
Int32

Returns

Applies to

Create(GRRecordingContext, Boolean, SKImageInfo, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, SkiaSharp.SKSurfaceProperties props);

Parameters

budgeted
Boolean

Returns

Applies to

Create(GRContext, Boolean, SKImageInfo, Int32, SKSurfaceProperties)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.SKSurfaceProperties props);

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

sampleCount
Int32

The number of samples.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);

Parameters

colorType
SKColorType

Returns

Applies to

Create(GRContext, GRBackendTexture, SKColorType)

Wraps a pre-existing 3D API texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

colorType
SKColorType

The color type to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendRenderTargetDesc, SKSurfaceProps)

Caution

Use Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties) instead.

Wraps a pre-existing 3D API render target as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendRenderTargetDesc desc, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendRenderTargetDesc desc, SkiaSharp.SKSurfaceProps props);

Parameters

context
GRContext

The graphics context.

desc
GRBackendRenderTargetDesc

The description of the existing render target.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRContext, GRBackendRenderTarget, SKColorType)

Wraps a pre-existing 3D API render target as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.SKColorType colorType);

Parameters

context
GRContext

The graphics context.

renderTarget
GRBackendRenderTarget

The description of the existing render target.

colorType
SKColorType

The color type to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(SKPixmap, SKSurfaceProps)

Caution

Use Create(SKPixmap, SKSurfaceProperties) instead.

Creates a new surface with the specified pixmap and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKPixmap pixmap, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(SKPixmap, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.SKPixmap pixmap, SkiaSharp.SKSurfaceProps props);

Parameters

pixmap
SKPixmap

The pixmap.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(SKPixmap, SKSurfaceProperties)

Creates a new surface with the specified pixmap and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKPixmap pixmap, SkiaSharp.SKSurfaceProperties props);

Parameters

pixmap
SKPixmap

The pixmap.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(SKImageInfo, IntPtr)

Creates a new surface with the specified image parameters using a provided buffer.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendTextureDesc, SKSurfaceProps)

Caution

Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType, SKSurfaceProperties) instead.

Wraps a pre-existing 3D API texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTextureDesc desc, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTextureDesc desc, SkiaSharp.SKSurfaceProps props);

Parameters

context
GRContext

The graphics context.

desc
GRBackendTextureDesc

The description of the existing texture.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(SKImageInfo, Int32)

Creates a new surface from the specified image parameters.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, int rowBytes);

Parameters

info
SKImageInfo

The image configuration parameters.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer with the parameters specified in info .

Applies to

Create(SKImageInfo, SKSurfaceProperties)

Creates a new surface from the specified image parameters and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, SkiaSharp.SKSurfaceProperties props);

Parameters

info
SKImageInfo

The image configuration parameters.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer with the parameters specified in info and the properties specified in props.

Applies to

Create(GRRecordingContext, GRBackendTexture, SKColorType, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

colorType
SKColorType

Returns

Applies to

Create(GRContext, GRBackendTextureDesc)

Caution

Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType) instead.

Wraps a pre-existing 3D API texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTextureDesc desc);
[System.Obsolete("Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTextureDesc desc);

Parameters

context
GRContext

The graphics context.

desc
GRBackendTextureDesc

The description of the existing texture.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRContext, GRBackendRenderTargetDesc)

Caution

Use Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType) instead.

Wraps a pre-existing 3D API render target as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendRenderTargetDesc desc);
[System.Obsolete("Use Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendRenderTargetDesc desc);

Parameters

context
GRContext

The graphics context.

desc
GRBackendRenderTargetDesc

The description of the existing render target.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(SKPixmap)

Creates a new surface with the specified pixmap.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKPixmap pixmap);

Parameters

pixmap
SKPixmap

The pixmap.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(SKImageInfo)

Creates a new surface with the specified image parameters.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info);

Parameters

info
SKImageInfo

Contains the image configuration parameters.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer with the parameters specified in info.

Applies to

Create(SKImageInfo, SKSurfaceProps)

Caution

Use Create(SKImageInfo, SKSurfaceProperties) instead.

Creates a new surface from the specified image parameters and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(SKImageInfo, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, SkiaSharp.SKSurfaceProps props);

Parameters

info
SKImageInfo

The image configuration parameters.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Remarks

This will create a buffer with the parameters specified in info and the properties specified in props.

Applies to

Create(GRContext, GRGlBackendTextureDesc, SKSurfaceProps)

Caution

Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType, SKSurfaceProperties) instead.

Wraps a pre-existing OpenGL texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRGlBackendTextureDesc desc, SkiaSharp.SKSurfaceProps props);
[System.Obsolete("Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType, SKSurfaceProperties) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRGlBackendTextureDesc desc, SkiaSharp.SKSurfaceProps props);

Parameters

context
GRContext

The graphics context.

desc
GRGlBackendTextureDesc

The description of the existing OpenGL texture.

props
SKSurfaceProps

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRContext, GRGlBackendTextureDesc)

Caution

Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType) instead.

Wraps a pre-existing OpenGL texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRGlBackendTextureDesc desc);
[System.Obsolete("Use Create(GRContext, GRBackendTexture, GRSurfaceOrigin, int, SKColorType) instead.")]
public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRGlBackendTextureDesc desc);

Parameters

context
GRContext

The graphics context.

desc
GRGlBackendTextureDesc

The description of the existing OpenGL texture.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Attributes

Applies to

Create(GRRecordingContext, GRBackendRenderTarget, SKColorType)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.SKColorType colorType);

Parameters

renderTarget
GRBackendRenderTarget
colorType
SKColorType

Returns

Applies to

Create(GRRecordingContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

renderTarget
GRBackendRenderTarget
colorType
SKColorType

Returns

Applies to

Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);

Parameters

renderTarget
GRBackendRenderTarget
colorType
SKColorType

Returns

Applies to

Create(GRContext, Boolean, SKImageInfo, Int32)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount);

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

sampleCount
Int32

The number of samples.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, Boolean, SKImageInfo, SKSurfaceProperties)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, bool budgeted, SkiaSharp.SKImageInfo info, SkiaSharp.SKSurfaceProperties props);

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, Boolean, SKImageInfo)

Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface.

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

Parameters

context
GRContext

The graphics context.

budgeted
Boolean

Whether an allocation should count against a cache budget.

info
SKImageInfo

The image configuration parameters.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)

Wraps a pre-existing backend 3D API texture as a surface.

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

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

origin
GRSurfaceOrigin

The origin of the texture.

colorType
SKColorType

The color type to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties)

Wraps a pre-existing backend 3D API render target as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

context
GRContext

The graphics context.

renderTarget
GRBackendRenderTarget

The description of the existing render target.

colorType
SKColorType

The color type to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(GRContext, GRBackendTexture, SKColorType, SKSurfaceProperties)

Wraps a pre-existing backend 3D API texture as a surface.

public static SkiaSharp.SKSurface Create (SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);

Parameters

context
GRContext

The graphics context.

texture
GRBackendTexture

The description of the existing texture.

colorType
SKColorType

The color type to use for the surface.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to

Create(SKImageInfo, IntPtr, Int32)

Creates a new surface with the specified image parameters using a provided buffer.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer that will be backend by the in-memory buffer provided in pixels.

Applies to

Create(SKImageInfo, IntPtr, SKSurfaceProperties)

Creates a new surface from the specified image parameters and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, IntPtr pixels, SkiaSharp.SKSurfaceProperties props);

Parameters

info
SKImageInfo

The image configuration parameters.

pixels
IntPtr

The pointer to an in memory-buffer that can hold the image as specified.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer with the parameters specified in infoand the properties specified in props.

Applies to

Create(SKImageInfo, Int32, SKSurfaceProperties)

Creates a new surface from the specified image parameters and surface properties.

public static SkiaSharp.SKSurface Create (SkiaSharp.SKImageInfo info, int rowBytes, SkiaSharp.SKSurfaceProperties props);

Parameters

info
SKImageInfo

The image configuration parameters.

rowBytes
Int32

The number of bytes per row in the pixel buffer.

props
SKSurfaceProperties

The surface property configuration.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Remarks

This will create a buffer with the parameters specified in infoand the properties specified in props.

Applies to

Create(GRRecordingContext, Boolean, SKImageInfo)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info);

Parameters

budgeted
Boolean

Returns

Applies to

Create(GRRecordingContext, GRBackendTexture, SKColorType)

public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);

Parameters

colorType
SKColorType

Returns

Applies to

Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType)

Wraps a pre-existing backend 3D API render target as a surface.

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

Parameters

context
GRContext

The graphics context.

renderTarget
GRBackendRenderTarget

The description of the existing render target.

origin
GRSurfaceOrigin

The origin of the texture.

colorType
SKColorType

The color type to use for the surface.

Returns

Returns the new surface if it could be created and the configuration is supported, otherwise null.

Applies to