makeRenderTarget

fun makeRenderTarget(context: DirectContext, budgeted: Boolean, imageInfo: ImageInfo): Surface

Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the width, height, and ColorType in ImageInfo. describes the pixel format in ColorType, and transparency in AlphaType, and color matching in ColorSpace.

Return

new SkSurface

Parameters

context

GPU context

budgeted

selects whether allocation for pixels is tracked by context

imageInfo

width, height, ColorType, AlphaType, ColorSpace; width, or height, or both, may be zero


fun makeRenderTarget(context: DirectContext, budgeted: Boolean, imageInfo: ImageInfo, sampleCount: Int, surfaceProps: SurfaceProps?): Surface

Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the width, height, and ColorType in ImageInfo. describes the pixel format in ColorType, and transparency in AlphaType, and color matching in ColorSpace.

sampleCount requests the number of samples per pixel. Pass zero to disable multi-sample anti-aliasing. The request is rounded up to the next supported count, or rounded down if it is larger than the maximum supported count.

Return

new SkSurface

Parameters

context

GPU context

budgeted

selects whether allocation for pixels is tracked by context

imageInfo

width, height, ColorType, AlphaType, ColorSpace; width, or height, or both, may be zero

sampleCount

samples per pixel, or 0 to disable full scene anti-aliasing

surfaceProps

LCD striping orientation and setting for device independent fonts; may be null


fun makeRenderTarget(context: DirectContext, budgeted: Boolean, imageInfo: ImageInfo, sampleCount: Int, origin: SurfaceOrigin, surfaceProps: SurfaceProps?): Surface

Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the width, height, and ColorType in ImageInfo. describes the pixel format in ColorType, and transparency in AlphaType, and color matching in ColorSpace.

sampleCount requests the number of samples per pixel. Pass zero to disable multi-sample anti-aliasing. The request is rounded up to the next supported count, or rounded down if it is larger than the maximum supported count.

Return

new SkSurface

Parameters

context

GPU context

budgeted

selects whether allocation for pixels is tracked by context

imageInfo

width, height, ColorType, AlphaType, ColorSpace; width, or height, or both, may be zero

sampleCount

samples per pixel, or 0 to disable full scene anti-aliasing

origin

pins either the top-left or the bottom-left corner to the origin.

surfaceProps

LCD striping orientation and setting for device independent fonts; may be null


fun makeRenderTarget(context: DirectContext, budgeted: Boolean, imageInfo: ImageInfo, sampleCount: Int, origin: SurfaceOrigin, surfaceProps: SurfaceProps?, shouldCreateWithMips: Boolean): Surface

Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the width, height, and ColorType in ImageInfo. describes the pixel format in ColorType, and transparency in AlphaType, and color matching in ColorSpace.

sampleCount requests the number of samples per pixel. Pass zero to disable multi-sample anti-aliasing. The request is rounded up to the next supported count, or rounded down if it is larger than the maximum supported count.

shouldCreateWithMips hints that Image returned by .makeImageSnapshot is mip map.

Return

new SkSurface

Parameters

context

GPU context

budgeted

selects whether allocation for pixels is tracked by context

imageInfo

width, height, ColorType, AlphaType, ColorSpace; width, or height, or both, may be zero

sampleCount

samples per pixel, or 0 to disable full scene anti-aliasing

origin

pins either the top-left or the bottom-left corner to the origin.

surfaceProps

LCD striping orientation and setting for device independent fonts; may be null

shouldCreateWithMips

hint that SkSurface will host mip map images