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
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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- origin
- GRSurfaceOrigin
- 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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- origin
- GRSurfaceOrigin
- colorType
- SKColorType
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- renderTarget
- GRBackendRenderTarget
- origin
- GRSurfaceOrigin
- colorType
- SKColorType
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- renderTarget
- GRBackendRenderTarget
- origin
- GRSurfaceOrigin
- 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
- context
- GRRecordingContext
- budgeted
- Boolean
- info
- SKImageInfo
- sampleCount
- Int32
- origin
- GRSurfaceOrigin
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
- context
- GRRecordingContext
- budgeted
- Boolean
- info
- SKImageInfo
- sampleCount
- Int32
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- renderTarget
- GRBackendRenderTarget
- origin
- GRSurfaceOrigin
- colorType
- SKColorType
- colorspace
- SKColorSpace
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- origin
- GRSurfaceOrigin
- 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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- origin
- GRSurfaceOrigin
- sampleCount
- Int32
- colorType
- SKColorType
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- origin
- GRSurfaceOrigin
- sampleCount
- Int32
- colorType
- SKColorType
- colorspace
- SKColorSpace
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- budgeted
- Boolean
- info
- SKImageInfo
- sampleCount
- Int32
- origin
- GRSurfaceOrigin
- props
- SKSurfaceProperties
- 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
- context
- GRRecordingContext
- budgeted
- Boolean
- info
- SKImageInfo
- 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
- context
- GRRecordingContext
- budgeted
- Boolean
- info
- SKImageInfo
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- origin
- GRSurfaceOrigin
- 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.
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
- context
- GRRecordingContext
- texture
- GRBackendTexture
- colorType
- SKColorType
- props
- SKSurfaceProperties
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.
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)
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.
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.
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
- context
- GRRecordingContext
- 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
- context
- GRRecordingContext
- renderTarget
- GRBackendRenderTarget
- colorType
- SKColorType
- props
- SKSurfaceProperties
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
- context
- GRRecordingContext
- renderTarget
- GRBackendRenderTarget
- origin
- GRSurfaceOrigin
- 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 info
and 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 info
and 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
- context
- GRRecordingContext
- budgeted
- Boolean
- info
- SKImageInfo
Returns
Applies to
Create(GRRecordingContext, GRBackendTexture, SKColorType)
public static SkiaSharp.SKSurface Create (SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
- texture
- GRBackendTexture
- 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
SkiaSharp