SKSurface.Create Method
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.
Overloads
| Name | Description |
|---|---|
| Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace) |
Wraps a pre-existing backend 3D API render target as a surface. |
| Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties) |
Wraps a pre-existing backend 3D API render target as a surface. |
| Create(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKSurfaceProperties) |
Wraps a pre-existing backend 3D API texture as a 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, Boolean, SKImageInfo, Int32, SKSurfaceProperties) |
Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface. |
| Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace) |
Creates a surface that wraps a GPU backend render target with color space. |
| Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties) |
Creates a surface that wraps a GPU backend render target with origin and properties. |
| Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKSurfaceProperties) |
Creates a surface that wraps a GPU backend texture with origin and properties. |
| Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType) |
Creates a surface that wraps a GPU backend texture with multisampling. |
| Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin) |
Creates a GPU-accelerated surface with multisampling and specified origin. |
| Create(GRRecordingContext, Boolean, SKImageInfo, Int32, SKSurfaceProperties) |
Creates a GPU-accelerated surface with multisampling and properties. |
| Create(SKImageInfo, IntPtr, Int32, SKSurfaceReleaseDelegate, Object) |
Creates a new surface with the specified image parameters using a provided buffer. |
| 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) |
Creates a surface that wraps a GPU backend render target with color space and properties. |
| Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace) |
Creates a surface that wraps a GPU backend texture with multisampling and color space. |
| Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKSurfaceProperties) |
Creates a surface that wraps a GPU backend texture with multisampling and properties. |
| Create(SKImageInfo, IntPtr, Int32, SKSurfaceReleaseDelegate, Object, SKSurfaceProperties) |
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) |
Creates a surface that wraps a GPU backend texture with all options. |
| Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin, SKSurfaceProperties, Boolean) |
Creates a GPU-accelerated surface with all options including mipmap support. |
| 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) |
Creates a GPU-accelerated surface with multisampling support. |
| Create(GRContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType) |
Wraps a pre-existing backend 3D API texture as a surface. |
| Create(GRRecordingContext, GRBackendTexture, SKColorType, SKSurfaceProperties) |
Creates a surface that wraps a GPU backend texture with surface properties. |
| Create(SKImageInfo) |
Creates a new surface with the specified image parameters. |
| Create(SKPixmap) |
Creates a new surface with the specified pixmap. |
| Create(SKImageInfo, SKSurfaceProperties) |
Creates a new surface from the specified image parameters and surface properties. |
| Create(SKImageInfo, Int32) |
Creates a new surface from the specified image parameters. |
| Create(SKImageInfo, IntPtr) |
Creates a new surface with the specified image parameters using a provided buffer. |
| Create(SKPixmap, SKSurfaceProperties) |
Creates a new surface with the specified pixmap and surface properties. |
| Create(GRRecordingContext, Boolean, SKImageInfo, SKSurfaceProperties) |
Creates a GPU-accelerated surface with the specified image info and properties. |
| Create(GRContext, GRBackendTexture, SKColorType) |
Wraps a pre-existing 3D API texture as a surface. |
| Create(GRContext, Boolean, SKImageInfo) |
Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface. |
| Create(GRRecordingContext, GRBackendRenderTarget, SKColorType) |
Creates a surface that wraps a GPU backend render target. |
| Create(GRRecordingContext, GRBackendTexture, SKColorType) |
Creates a surface that wraps a GPU backend texture. |
| Create(GRRecordingContext, Boolean, SKImageInfo) |
Creates a GPU-accelerated surface with the specified image info. |
| Create(GRContext, GRBackendRenderTarget, SKColorType) |
Wraps a pre-existing 3D API render target as a surface. |
| Create(SKImageInfo, IntPtr, SKSurfaceProperties) |
Creates a new surface from the specified image parameters and surface properties. |
| Create(SKImageInfo, IntPtr, Int32) |
Creates a new surface with the specified image parameters using a provided buffer. |
| Create(GRContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType) |
Wraps a pre-existing backend 3D API render target as a surface. |
| Create(GRContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties) |
Wraps a pre-existing backend 3D API render target as a surface. |
| Create(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType) |
Wraps a pre-existing backend 3D API texture as a surface. |
| Create(GRContext, GRBackendTexture, SKColorType, SKSurfaceProperties) |
Wraps a pre-existing backend 3D API texture as a 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(SKImageInfo, Int32, SKSurfaceProperties) |
Creates a new surface from the specified image parameters and surface properties. |
| Create(GRContext, Boolean, SKImageInfo, Int32) |
Creates a new surface whose contents will be drawn to an offscreen render target, allocated by the surface. |
| Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType) |
Creates a surface that wraps a GPU backend render target with the specified origin. |
| Create(GRRecordingContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties) |
Creates a surface that wraps a GPU backend render target with surface properties. |
| Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType) |
Creates a surface that wraps a GPU backend texture with the specified origin. |
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(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, 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, 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, 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, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKColorSpace)
Creates a surface that wraps a GPU backend render target with color space.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- renderTarget
- GRBackendRenderTarget
The backend render target to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- colorType
- SKColorType
The color type of the surface.
- colorspace
- SKColorSpace
The color space of the surface.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType, SKSurfaceProperties)
Creates a surface that wraps a GPU backend render target with origin and properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- renderTarget
- GRBackendRenderTarget
The backend render target to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- colorType
- SKColorType
The color type of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKSurfaceProperties)
Creates a surface that wraps a GPU backend texture with origin and properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- colorType
- SKColorType
The color type of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType)
Creates a surface that wraps a GPU backend texture with multisampling.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- colorType
- SKColorType
The color type of the surface.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin)
Creates a GPU-accelerated surface with multisampling and specified origin.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.GRSurfaceOrigin origin);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- budgeted
- Boolean
Whether the surface should count against the GPU resource budget.
- info
- SKImageInfo
The image info describing the surface dimensions and format.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, Boolean, SKImageInfo, Int32, SKSurfaceProperties)
Creates a GPU-accelerated surface with multisampling and properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- budgeted
- Boolean
Whether the surface should count against the GPU resource budget.
- info
- SKImageInfo
The image info describing the surface dimensions and format.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
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(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)
Creates a surface that wraps a GPU backend render target with color space and properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- renderTarget
- GRBackendRenderTarget
The backend render target to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- colorType
- SKColorType
The color type of the surface.
- colorspace
- SKColorSpace
The color space of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKColorSpace)
Creates a surface that wraps a GPU backend texture with multisampling and color space.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType, SkiaSharp.SKColorSpace colorspace);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- colorType
- SKColorType
The color type of the surface.
- colorspace
- SKColorSpace
The color space of the surface.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, Int32, SKColorType, SKSurfaceProperties)
Creates a surface that wraps a GPU backend texture with multisampling and properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, int sampleCount, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- colorType
- SKColorType
The color type of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
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(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)
Creates a surface that wraps a GPU backend texture with all options.
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
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- colorType
- SKColorType
The color type of the surface.
- colorspace
- SKColorSpace
The color space of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, Boolean, SKImageInfo, Int32, GRSurfaceOrigin, SKSurfaceProperties, Boolean)
Creates a GPU-accelerated surface with all options including mipmap support.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKSurfaceProperties props, bool shouldCreateWithMips);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- budgeted
- Boolean
Whether the surface should count against the GPU resource budget.
- info
- SKImageInfo
The image info describing the surface dimensions and format.
- sampleCount
- Int32
The number of samples for MSAA rendering.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- props
- SKSurfaceProperties
The surface properties.
- shouldCreateWithMips
- Boolean
Whether to create mipmaps.
Returns
A new SKSurface, or null on failure.
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)
Creates a GPU-accelerated surface with multisampling support.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, int sampleCount);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- budgeted
- Boolean
Whether the surface should count against the GPU resource budget.
- info
- SKImageInfo
The image info describing the surface dimensions and format.
- sampleCount
- Int32
The number of samples for MSAA rendering.
Returns
A new SKSurface, or null on failure.
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(GRRecordingContext, GRBackendTexture, SKColorType, SKSurfaceProperties)
Creates a surface that wraps a GPU backend texture with surface properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- colorType
- SKColorType
The color type of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
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(SKPixmap)
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(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, 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(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(GRRecordingContext, Boolean, SKImageInfo, SKSurfaceProperties)
Creates a GPU-accelerated surface with the specified image info and properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- budgeted
- Boolean
Whether the surface should count against the GPU resource budget.
- info
- SKImageInfo
The image info describing the surface dimensions and format.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
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, 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(GRRecordingContext, GRBackendRenderTarget, SKColorType)
Creates a surface that wraps a GPU backend render target.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- renderTarget
- GRBackendRenderTarget
The backend render target to wrap.
- colorType
- SKColorType
The color type of the surface.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendTexture, SKColorType)
Creates a surface that wraps a GPU backend texture.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- colorType
- SKColorType
The color type of the surface.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, Boolean, SKImageInfo)
Creates a GPU-accelerated surface with the specified image info.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, bool budgeted, SkiaSharp.SKImageInfo info);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- budgeted
- Boolean
Whether the surface should count against the GPU resource budget.
- info
- SKImageInfo
The image info describing the surface dimensions and format.
Returns
A new SKSurface, or null on failure.
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(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, 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(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
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, 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, 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(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(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(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(GRRecordingContext, GRBackendRenderTarget, GRSurfaceOrigin, SKColorType)
Creates a surface that wraps a GPU backend render target with the specified origin.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- renderTarget
- GRBackendRenderTarget
The backend render target to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- colorType
- SKColorType
The color type of the surface.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendRenderTarget, SKColorType, SKSurfaceProperties)
Creates a surface that wraps a GPU backend render target with surface properties.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.SKColorType colorType, SkiaSharp.SKSurfaceProperties props);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- renderTarget
- GRBackendRenderTarget
The backend render target to wrap.
- colorType
- SKColorType
The color type of the surface.
- props
- SKSurfaceProperties
The surface properties.
Returns
A new SKSurface, or null on failure.
Applies to
Create(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)
Creates a surface that wraps a GPU backend texture with the specified origin.
public static SkiaSharp.SKSurface Create(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU recording context.
- texture
- GRBackendTexture
The backend texture to wrap.
- origin
- GRSurfaceOrigin
The origin of the surface texture.
- colorType
- SKColorType
The color type of the surface.
Returns
A new SKSurface, or null on failure.