Dimension

sealed interface Dimension

Represents either the width or height of a Size.

Inheritors

Types

Link copied to clipboard
value class Pixels(val px: Int) : Dimension

Represents a fixed, positive number of pixels.

Link copied to clipboard
data object Undefined : Dimension

Represents an undefined pixel value.

Functions

Link copied to clipboard
inline fun Dimension.pxOrElse(block: () -> Int): Int

If this is a Dimension.Pixels value, return its pixel value. Else, invoke and return the value from block.