Insets

data class Insets(val left: Int = 0, val top: Int = 0, val right: Int = 0, val bottom: Int = 0)(source)

Immutable non-negative distances applied to the four sides of a rectangle.

Horizontal and vertical totals are checked during construction. Every constructed instance can therefore be used by layout arithmetic without silently wrapping an integer.

Throws

when a side is negative.

when either axis total cannot be represented as an Int.

Constructors

Link copied to clipboard
constructor(left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0)

Types

Link copied to clipboard
object Companion

Common immutable inset values and factories.

Properties

Link copied to clipboard
val bottom: Int

the distance on the bottom side.

Link copied to clipboard
val left: Int

the distance on the left side.

Link copied to clipboard
val right: Int

the distance on the right side.

Link copied to clipboard
val top: Int

the distance on the top side.