Source set: Common
public class IntSize @PublishedApi internal constructor(public 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
width
Source set: Common
public inline val width: Int
The horizontal aspect of the size in Int pixels.
height
Source set: Common
public inline val height: Int
The vertical aspect of the size in Int pixels.
Functions
component1
Source set: Common
@Stable public inline operator fun component1(): Int
component2
Source set: Common
@Stable public inline operator fun component2(): Int
times
Source set: Common
public operator fun times(other: Int): IntSize
Returns an IntSize scaled by multiplying width and height by other
div
Source set: Common
public operator fun div(other: Int): IntSize
Returns an IntSize scaled by dividing width and height by other
Members
Companion
Source set: Common
public companion object
Properties
Zero
Source set: Common
public val Zero: IntSize
IntSize with a zero (0) width and height.