PxPosition

@Immutable data class PxPosition
kotlin.Any
   ↳ androidx.ui.core.PxPosition

A two-dimensional position using Px for units

Summary

Public methods

operator PxPosition
minus(other: PxPosition)

Subtract a PxPosition from another one.

operator PxPosition

Subtract a IntPxPosition from this PxPosition.

operator PxPosition
plus(other: PxPosition)

Add a PxPosition to another one.

operator PxPosition

Add a IntPxPosition to this PxPosition.

String

operator PxPosition

Returns a new PxPosition representing the negation of this point.

Extension functions

From androidx.ui.core
Px

The magnitude of the offset represented by this PxPosition.

IntPxPosition

Round a PxPosition down to the nearest Int coordinates.

Offset

Convert a PxPosition to a Offset.

Properties

Px

The horizontal aspect of the position in Px

Px

The vertical aspect of the position in Px

Companion properties

PxPosition

Public methods

minus

inline operator fun minus(other: PxPosition): PxPosition

Subtract a PxPosition from another one.

minus

inline operator fun minus(other: IntPxPosition): PxPosition

Subtract a IntPxPosition from this PxPosition.

plus

inline operator fun plus(other: PxPosition): PxPosition

Add a PxPosition to another one.

plus

inline operator fun plus(other: IntPxPosition): PxPosition

Add a IntPxPosition to this PxPosition.

toString

fun toString(): String

unaryMinus

inline operator fun unaryMinus(): PxPosition

Returns a new PxPosition representing the negation of this point.

Properties

x

inline val x: Px

The horizontal aspect of the position in Px

y

inline val y: Px

The vertical aspect of the position in Px

Companion properties

Origin

val Origin: PxPosition