align

abstract fun align(size: Dimension, space: Dimension, orientation: ComponentOrientation): Point

The child's offset from the top left of space, for a child of extent size in a container laid out under orientation.

Return

the offset, applied without clamping.

Parameters

size

the child's own extent, which an alignment reads and never changes.

space

the extent offered, inside which the child is placed.

orientation

the container's reading order; a right-to-left one mirrors the horizontal half of the placement, so Alignment.TopStart resolves to the top right corner.