IntOffset


A two-dimensional position using Int pixels for units

Summary

Nested types

Public companion properties

IntOffset
Cmn

Public functions

inline operator Int
Cmn
inline operator Int
Cmn
IntOffset
copy(x: Int, y: Int)

Returns a copy of this IntOffset instance optionally overriding the x or y parameter

Cmn
operator IntOffset
div(operand: Float)

Division operator.

Cmn
inline operator IntOffset
minus(other: IntOffset)

Subtract a IntOffset from another one.

Cmn
inline operator IntOffset
plus(other: IntOffset)

Add a IntOffset to another one.

Cmn
operator IntOffset
rem(operand: Int)

Modulo (remainder) operator.

Cmn
operator IntOffset
times(operand: Float)

Multiplication operator.

Cmn
open String
Cmn
inline operator IntOffset

Returns a new IntOffset representing the negation of this point.

Cmn

Public properties

Int

The horizontal aspect of the position in Int pixels.

Cmn
Int

The vertical aspect of the position in Int pixels.

Cmn

Extension functions

operator Offset
Cmn
operator Offset
Cmn
inline Offset

Converts the IntOffset to an Offset.

Cmn

Public companion properties

Zero

val ZeroIntOffset

Public functions

component1

inline operator fun component1(): Int

component2

inline operator fun component2(): Int

copy

fun copy(x: Int = unpackInt1(packedValue), y: Int = unpackInt2(packedValue)): IntOffset

Returns a copy of this IntOffset instance optionally overriding the x or y parameter

div

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

inline operator fun minus(other: IntOffset): IntOffset

Subtract a IntOffset from another one.

plus

inline operator fun plus(other: IntOffset): IntOffset

Add a IntOffset to another one.

rem

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

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

open fun toString(): String

unaryMinus

inline operator fun unaryMinus(): IntOffset

Returns a new IntOffset representing the negation of this point.

Public properties

x

val xInt

The horizontal aspect of the position in Int pixels.

y

val yInt

The vertical aspect of the position in Int pixels.

Extension functions

operator fun IntOffset.minus(offset: Offset): Offset
operator fun IntOffset.plus(offset: Offset): Offset

toOffset

inline fun IntOffset.toOffset(): Offset

Converts the IntOffset to an Offset.