Point

data class Point(val x: Int, val y: Int) : Parcelable

Represents a point by its x and y position in pixels on the screen.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

x

The x position.

y

The y position.

Constructors

Link copied to clipboard
fun Point(x: Int, y: Int)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val x: Int
Link copied to clipboard
val y: Int

Extensions

Link copied to clipboard
operator fun Point.minus(anotherPoint: Point): Point

Subtracts anotherPoint from this Point by subtracting the corresponding x and y coordinates.

Link copied to clipboard
operator fun Point.plus(anotherPoint: Point): Point

Add anotherPoint to this Point by adding the corresponding x and y coordinates.

Link copied to clipboard
operator fun Point.times(times: Double): Point

Multiply this Point by a given amount by multiplying the x and y coordinates.