alignRectangle

Place a rectangle inside another based on its specified alignment. This function considers NodeAlign.fill to be equivalent to NodeAlign.start.

This function may commonly be used with Layout.nodeAlign.

Parameters

alignment NodeAlign[2]

Alignment to use for the child rectangle.

space Rectangle

Rectangle denoting available space (parent).

size Vector2

Size of the rectangle to place (child).

Return Value

Type: Vector2

position = Position assigned to the child rectangle.

Meta