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

Extensions for android.graphics.PointF

component1

operator fun PointF.component1(): Float

Returns the x coordinate of this point.

component2

operator fun PointF.component2(): Float

Returns the y coordinate of this point.

minus

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

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

operator fun PointF.minus(xy: Float): PointF

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 PointF.plus(p: PointF): PointF

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

operator fun PointF.plus(xy: Float): PointF

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

toPoint

fun PointF.toPoint(): Point

Returns a Point representation of this point.

unaryMinus

operator fun PointF.unaryMinus(): PointF

Returns a new point representing the negation of this point.