public readonly struct StackF
A series of horizontally stacked rectangles.

Properties

Bounds

#
Gets the outer bounds of the stack.
public RectangleF Bounds { get; }

Count

#
Gets the number of rectangles making up this stack.
public int Count { get; }

Indexers

this[]

#
Gets the rectangle within the stack at the given index.
public RectangleF this[
index
] { get; }

Methods

Adjust

#
Adjust the width of a box.
public StackF Adjust(
index,
Index of box.
width
New width of box.
)

Append

#
Append a box at the end of the stack.
public StackF Append(
width
Width of box to append.
)

Ceiling

#
Round all values to the nearest bigger integer. This operation may increase the bounds by more than a single unit.
public StackF Ceiling()

CreateFromMiddleLeft

#
Create a stack from the middle left corner and a set of element widths.
public static StackF CreateFromMiddleLeft(
PointF
anchor,
Middle left corner of bounds.
params SizeF[]
sizes
Sizes of each segment. Note that the highest segments overwrites the other heights.
)

CreateFromTopLeft

#
Create a stack from the upper left corner and a set of element widths.
public static StackF CreateFromTopLeft(
PointF
anchor,
Top left corner of bounds.
height,
Height of bounds.
params float[]
widths
Widths of each segment.
)

CreateFromTopLeft

#
Create a stack from the upper left corner and a set of element widths.
public static StackF CreateFromTopLeft(
PointF
anchor,
Top left corner of bounds.
params SizeF[]
sizes
Sizes of each segment. Note that the highest segments overwrites the other heights.
)

CreateSingular

#
Create a stack containing a single item.
public static StackF CreateSingular(
RectangleF
bounds
)

Grow

#
Append a certain width to an existing element.
public StackF Grow(
index,
Index of element to adjust.
width
Width to append (or subtract, if width is negative).
)

Move

#
Move this stack.
public StackF Move(
dx,
dy
)

Transition

#
Gets the x-coordinate of the transition between rectangles. index=0 refers to the left boundary of the leftmost rectangle, index=Count+1 refers to the right boundary of the rightmost rectangle.
public float Transition(
index
)

WithHeight

#
Adjust the vertical dimensions of the stack.
public StackF WithHeight(
newHeight
)

WithTop

#
Adjust the vertical dimensions of the stack.
public StackF WithTop(
newTop
)

WithVertical

#
Adjust the vertical dimensions of the stack.
public StackF WithVertical(
newTop,
newHeight
)