IntOffset
@Immutable inline class IntOffset
kotlin.Any | |
↳ | androidx.compose.ui.unit.IntOffset |
A two-dimensional position using Int pixels for units
Summary
Public constructors | |
---|---|
A two-dimensional position using Int pixels for units |
Public methods | |
---|---|
operator Int | |
operator Int | |
IntOffset |
Returns a copy of this IntOffset instance optionally overriding the x or y parameter |
operator IntOffset |
Division operator. |
operator IntOffset |
Subtract a IntOffset from another one. |
operator IntOffset |
Add a IntOffset to another one. |
operator IntOffset |
Modulo (remainder) operator. |
operator IntOffset |
Multiplication operator. |
String |
toString() |
operator IntOffset |
Returns a new IntOffset representing the negation of this point. |
Extension functions | ||||||
---|---|---|---|---|---|---|
From androidx.compose.ui.unit
|
Properties | |
---|---|
Int |
The horizontal aspect of the position in Int pixels. |
Int |
The vertical aspect of the position in Int pixels. |
Companion properties | |
---|---|
IntOffset |
Public constructors
Public methods
component1
@Stable operator fun component1(): Int
component2
@Stable operator fun component2(): Int
copy
fun copy(
x: Int = this.x,
y: Int = this.y
): IntOffset
Returns a copy of this IntOffset instance optionally overriding the x or y parameter
div
@Stable operator fun div(operand: Float): IntOffset
Division operator.
Returns an IntOffset whose coordinates are the coordinates of the left-hand-side operand (an IntOffset) divided by the scalar right-hand-side operand (a Float). The result is rounded to the nearest integer.
minus
@Stable inline operator fun minus(other: IntOffset): IntOffset
Subtract a IntOffset from another one.
rem
@Stable operator fun rem(operand: Int): IntOffset
Modulo (remainder) operator.
Returns an IntOffset whose coordinates are the remainder of dividing the coordinates of the left-hand-side operand (an IntOffset) by the scalar right-hand-side operand (an Int).
times
@Stable operator fun times(operand: Float): IntOffset
Multiplication operator.
Returns an IntOffset whose coordinates are the coordinates of the left-hand-side operand (an IntOffset) multiplied by the scalar right-hand-side operand (a Float). The result is rounded to the nearest integer.
toString
@Stable fun toString(): String
unaryMinus
@Stable inline operator fun unaryMinus(): IntOffset
Returns a new IntOffset representing the negation of this point.
Properties
Companion properties
Zero
val Zero: IntOffset