SpatialAlignment.Horizontal

interface SpatialAlignment.Horizontal

Known direct subclasses
SpatialBiasAlignment.Horizontal

Creates a weighted alignment that specifies a horizontal bias.


An interface to calculate the position of a box of a certain width inside an available width.

Summary

Public functions

Int
offset(width: Int, space: Int)

Provides the horizontal offset from the origin of the space to the origin of the content.

Public functions

offset

Added in 1.0.0-alpha04
fun offset(width: Int, space: Int): Int

Provides the horizontal offset from the origin of the space to the origin of the content.

Parameters
width: Int

The content width in pixels.

space: Int

The available space in pixels.

See also
horizontalOffset