-
public final class ScaledPointThis class represents a point on the ZoomEngine content surface.
It is scaled because, unlike AbsolutePoint, it is affected by the current zoom level. If content is zoomed in, the exact same content point will have bigger ScaledPoint coordinates.
-
-
Constructor Summary
Constructors Constructor Description ScaledPoint(ScaledPoint point)Copy constructor ScaledPoint(Float x, Float y)
-
Method Summary
Modifier and Type Method Description final FloatgetX()final UnitsetX(Float x)final FloatgetY()final UnitsetY(Float y)final Unitset(Number x, Number y)Set new coordinates final Unitset(Number x)Set new coordinates final Unitset()Set new coordinates final Unitset(ScaledPoint p)Set new coordinates final ScaledPointminus(ScaledPoint scaledPoint)Substract a point from another point final ScaledPointunaryMinus()Negate a point final ScaledPointplus(ScaledPoint scaledPoint)Add a point to another point final ScaledPointtimes(Number factor)Multiply every value in the point by a given factor -
-
Constructor Detail
-
ScaledPoint
ScaledPoint(ScaledPoint point)
Copy constructor- Parameters:
point- point to duplicate
-
-
Method Detail
-
set
@JvmOverloads() final Unit set(Number x, Number y)
Set new coordinates
- Parameters:
x- x-axis valuey- y-axis value
-
set
@JvmOverloads() final Unit set(Number x)
Set new coordinates
- Parameters:
x- x-axis value
-
set
@JvmOverloads() final Unit set()
Set new coordinates
-
set
final Unit set(ScaledPoint p)
Set new coordinates
- Parameters:
p- the ScaledPoint to copy values from
-
minus
final ScaledPoint minus(ScaledPoint scaledPoint)
Substract a point from another point
- Parameters:
scaledPoint- the point to substract
-
unaryMinus
final ScaledPoint unaryMinus()
Negate a point
-
plus
final ScaledPoint plus(ScaledPoint scaledPoint)
Add a point to another point
- Parameters:
scaledPoint- the point to add
-
times
final ScaledPoint times(Number factor)
Multiply every value in the point by a given factor
- Parameters:
factor- the factor to use
-
-
-
-