BoxMask

References
public sealed class BoxMask : IShapeMask
Represents a fast integer accurate AABB useful for sampling.

Properties

Geometry

#
public ShapeMaskGeometry Geometry { get; }
Gets the geometry of this mask.
Geometry

Height

#
public int Height { get; }
Gets the height of this mask.

RowCount

#
public int RowCount { get; }
Gets the number of rows in this mask.
RowCount

Rows

#
public IEnumerable<MaskRow> Rows { get; }
Enumerate over all rows in the mask.
Rows

SampleCount

#
public int SampleCount { get; }
Gets the area (number of samples) of this mask.
SampleCount

Samples

#
public IEnumerable<Point> Samples { get; }
Enumerate over all sample offsets.
Samples

Width

#
public int Width { get; }
Gets the width of this mask.

X0

#
public int X0 { get; }
The leftmost X coordinate.

Y0

#
public int Y0 { get; }
The topmost Y coordinate.

Indexers

this[]

#
public MaskRow this[int index] { get; }
Gets the row at the given index.
index (int)Row index, must be strictly less than RowCount.
Row at given index.
this[]

Methods

Create

#
public static BoxMask Create(int width, int height)
Create a new box mask.
width (int)Width of box.
height (int)Height of box.
Mask.