FREE TRIAL

|

☀
☾
struct

LengthRect

A set of Lengths used to configure offsets from each edge of a rectangle.

Fields

Bottom

The Length offset from a rectangle's bottom edge.

Left

The Length offset from a rectangle's left edge.

Right

The Length offset from a rectangle's right edge.

Top

The Length offset from a rectangle's top edge.

X

Left and Right as a Length2 pair.

Y

Bottom and Top as a Length2 pair.

Properties

Item[int]

Access each Length2 by axis index.

Percent

Assign all offsets, Left, Right, Bottom, and Top, to a Percent Length with the given percent, 1 == 100%.

Value

Assign all offsets, Left, Right, Bottom, and Top, to a Value Length with the given value.

Constructors

LengthRect(Length, Length, Length, Length)

Constructs a new LengthRect, specified per face.

LengthRect(Length2, Length2)

Constructs a new LengthRect, specified per axis.

Operators

Implicit(Length to LengthRect)

Constructs a new LengthRect and assigns each edge offset to the provided length.

Implicit(Length2 to LengthRect)

Constructs a new LengthRect and assigns each edge offset to the provided Length along its respective axis.

Implicit(float to LengthRect)

Constructs a new LengthRect and assigns each edge offset to a Value Length of value.

Implicit(Vector2 to LengthRect)

Constructs a new LengthRect and assigns each edge offset to a Value Length along its respective axis.

☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC