SpatialAlignment.Depth

interface SpatialAlignment.Depth

Known direct subclasses
SpatialBiasAlignment.Depth

Creates a weighted alignment that specifies a depth bias.


An interface to calculate the alignment of a box of a certain size inside an available depth.

Summary

Public functions

Int
align(size: Int, space: Int)

Provides the depth alignment offset from the origin of the space to the origin of the content.

Public functions

align

Added in 1.0.0-alpha16
fun align(size: Int, space: Int): Int

Provides the depth alignment offset from the origin of the space to the origin of the content.

Parameters
size: Int

The content size in pixels.

space: Int

The available space in pixels.