편집

다음을 통해 공유


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
public struct SKMask : IEquatable<SkiaSharp.SKMask>
Inheritance
SKMask
Implements

Constructors

SKMask(IntPtr, SKRectI, UInt32, SKMaskFormat)

Creates an instance of SKMask with the specified configuration.

SKMask(SKRectI, UInt32, SKMaskFormat)

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

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.

Create(ReadOnlySpan<Byte>, SKRectI, UInt32, SKMaskFormat)
Equals(Object)
Equals(SKMask)
FreeImage()

De-allocate the mask's image data.

FreeImage(IntPtr)

De-allocate the specified mask 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.

GetHashCode()
GetImageSpan()

Operators

Equality(SKMask, SKMask)
Inequality(SKMask, SKMask)

Applies to