androidx.compose.ui.unit

IntSize

Value class · from org.jetbrains.compose.ui:ui-unit:1.12.2

No hand-written docs yet.

A two-dimensional size class used for measuring in Int pixels.

value class IntSize

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a IntSize.

Properties

width

val width: Int

The horizontal aspect of the size in Int pixels.

height

val height: Int

The vertical aspect of the size in Int pixels.

Zero

val Zero: IntSize

IntSize with a zero (0) width and height.

packedValue

val packedValue: Long

Functions

component1

fun component1(): Int

component2

fun component2(): Int

times

fun times(other: Int): IntSize

Returns an IntSize scaled by multiplying width and height by other

div

fun div(other: Int): IntSize

Returns an IntSize scaled by dividing width and height by other

Library docs

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.