PointF

data class PointF(val x: Float, val y: Float) : Parcelable

Represents an xy position on the screen, expressed in pixels.

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 PointF(x: Float, y: Float)

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: Float
Link copied to clipboard
val y: Float

Extensions

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

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

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

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

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

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