library / com.otaliastudios.zoom / AbsolutePoint

AbsolutePoint

data class AbsolutePoint

This class represents a point on the ZoomEngine content surface.

It is absolute because it is defined with respect to the content own size & coordinate system, meaning that 0, 0 represents the content top-left corner.

Constructors

<init>

AbsolutePoint(point: AbsolutePoint)

Copy constructor

AbsolutePoint(x: Float = 0F, y: Float = 0F)

This class represents a point on the ZoomEngine content surface.

Properties

x

var x: Float

y

var y: Float

Functions

minus

operator fun minus(absolutePoint: AbsolutePoint): AbsolutePoint

Substract a point from another point

plus

operator fun plus(absolutePoint: AbsolutePoint): AbsolutePoint

Add a point to another point

set

fun set(x: Number = this.x, y: Number = this.y): Unit
fun set(p: AbsolutePoint): Unit

Set new coordinates

times

operator fun times(factor: Number): AbsolutePoint

Multiply every value in the point by a given factor

unaryMinus

operator fun unaryMinus(): AbsolutePoint

Negate a point