IntSize
A two-dimensional size class used for measuring in [Int] pixels.
IntSize
Class
Common
value class IntSize @PublishedApi internal constructor(val packedValue: Long)
A two-dimensional size class used for measuring in Int pixels.
To create an IntSize, call the top-level function that accepts a width/height pair of
dimensions:
val size = IntSize(width, height)
The primary constructor of IntSize is intended to be used with the packedValue property to
allow storing sizes in arrays or collections of primitives without boxing.
Parameters
| packedValue | Long value encoding the width and height components of the IntSize. Encoded values can be obtained by using the packedValue property of existing IntSize instances. |
Properties
Common
inline val width: Int
The horizontal aspect of the size in Int pixels.
Common
inline val height: Int
The vertical aspect of the size in Int pixels.
Functions
inline operator fun component1(): Int
inline operator fun component2(): Int
operator fun times(other: Int): IntSize
Returns an IntSize scaled by multiplying width and height by other
operator fun div(other: Int): IntSize
Returns an IntSize scaled by dividing width and height by other
Companion Object
Properties
Common
val Zero = IntSize(0L)
IntSize with a zero (0) width and height.
