SKMask Struct

Definition

A mask is used to describe alpha bitmaps, either 1-bit, 8-bit, or the 3-channel 3D format.

public struct SKMask
Inheritance
SKMask

Constructors

SKMask(SKRectI, UInt32, SKMaskFormat)

Creates an instance of SKMask with the specified configuration, but a null Image.

SKMask(IntPtr, SKRectI, UInt32, SKMaskFormat)

Creates an instance of SKMask with the specified configuration.

Properties

Bounds

Gets the bounds of the mask in the image.

Format

Gets the format of the mask image.

Image

Get the pointer to the mask's image data location.

IsEmpty

Gets a value indicating whether the mask's bounds are empty.

RowBytes

Gets the number of bytes per row.

Methods

AllocateImage()

Allocates a memory block for the mask's image.

AllocateImage(Int64)

Allocates a memory block for a mask's image.

ComputeImageSize()

Calculates the byte size of the mask, assuming only 1 plane.

ComputeTotalImageSize()

Calculates the byte size of the mask, taking into account any extra planes (e.g. ThreeD).

Create(Byte[], SKRectI, UInt32, SKMaskFormat)

Creates an instance of SKMask with the specified configuration, and copies the image data.

FreeImage(IntPtr)

De-allocate the specified mask image data.

FreeImage()

De-allocate the mask's image data.

GetAddr(Int32, Int32)

Returns the address of the specified pixel, computing the pixel-size at runtime based on the mask format.

GetAddr1(Int32, Int32)

Returns the bit value of the specified specified pixel.

GetAddr16(Int32, Int32)

Returns the 16-bit value of the specified specified pixel.

GetAddr32(Int32, Int32)

Returns the 32-bit value of the specified specified pixel.

GetAddr8(Int32, Int32)

Returns the 8-bit value of the specified specified pixel.

Applies to