Table of Contents

Struct OccupiedRect

Namespace
KernSmith.Atlas
Assembly
KernSmith.dll

A rectangular region of an atlas page that is already taken by an existing glyph, used as input to incremental packing (PackInto(IReadOnlyList<GlyphRect>, IReadOnlyList<OccupiedRect>, int, int, int)).

public readonly record struct OccupiedRect : IEquatable<OccupiedRect>
Implements
Inherited Members

Constructors

OccupiedRect(int, int, int, int, int)

A rectangular region of an atlas page that is already taken by an existing glyph, used as input to incremental packing (PackInto(IReadOnlyList<GlyphRect>, IReadOnlyList<OccupiedRect>, int, int, int)).

public OccupiedRect(int PageIndex, int X, int Y, int Width, int Height)

Parameters

PageIndex int

Which atlas page the region is on (zero-based).

X int

X pixel position of the top-left corner on the page.

Y int

Y pixel position of the top-left corner on the page.

Width int

Region width in pixels.

Height int

Region height in pixels.

Properties

Height

Region height in pixels.

public int Height { get; init; }

Property Value

int

PageIndex

Which atlas page the region is on (zero-based).

public int PageIndex { get; init; }

Property Value

int

Width

Region width in pixels.

public int Width { get; init; }

Property Value

int

X

X pixel position of the top-left corner on the page.

public int X { get; init; }

Property Value

int

Y

Y pixel position of the top-left corner on the page.

public int Y { get; init; }

Property Value

int