core-ktx / androidx.graphics / android.graphics.Point

Extensions for android.graphics.Point

component1

operator fun Point.component1(): Int

Returns the x coordinate of this point.

component2

operator fun Point.component2(): Int

Returns the y coordinate of this point.

minus

operator fun Point.minus(p: Point): Point

Offsets this point by the negation of the specified point and returns the result as a new point.

operator fun Point.minus(xy: Int): Point

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

plus

operator fun Point.plus(p: Point): Point

Offsets this point by the specified point and returns the result as a new point.

operator fun Point.plus(xy: Int): Point

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

toPointF

fun Point.toPointF(): PointF

Returns a PointF representation of this point.

unaryMinus

operator fun Point.unaryMinus(): Point

Returns a new point representing the negation of this point.