FloatRect

data class FloatRect(val left: Float, val top: Float, val right: Float, val bottom: Float)(source)

An immutable, thread-safe half-open rectangle with finite floating-point edges and extents.

Empty rectangles are valid geometry; individual drawing operations may require positive extents. Construction rejects unordered edges, non-finite coordinates, and extents that overflow a Float.

Throws

when an edge or extent is non-finite or the edges are unordered.

Constructors

Link copied to clipboard
constructor(left: Float, top: Float, right: Float, bottom: Float)

Properties

Link copied to clipboard

the exclusive bottom edge.

Link copied to clipboard

The finite, non-negative vertical extent.

Link copied to clipboard
val left: Float

the inclusive left edge.

Link copied to clipboard

the exclusive right edge.

Link copied to clipboard
val top: Float

the inclusive top edge.

Link copied to clipboard

The finite, non-negative horizontal extent.

Functions

Link copied to clipboard
operator fun plus(offset: IntOffset): FloatRect

Returns a translated rectangle using floating-point coordinate arithmetic.