public final class Transformation extends Object
a,
b, c, d for transforming a point of a
form (x, y) into (a*x + b, c*y + d) and doing the
reverse.| Constructor and Description |
|---|
Transformation(double a,
double b,
double c,
double d)
Creates a transformation object with the given coefficients.
|
| Modifier and Type | Method and Description |
|---|---|
Point |
transform(Point point)
Returns a transformed point.
|
Point |
transform(Point point,
double scale)
Returns a transformed point, multiplied by the given scale.
|
Point |
untransform(Point point)
Returns the reverse transformation of the given point, optionally divided by the given scale.
|
Point |
untransform(Point point,
double scale)
Returns the reverse transformation of the given point, optionally divided by the given scale.
|
public Transformation(double a,
double b,
double c,
double d)
a - Coefficient ab - Coefficient bc - Coefficient cd - Coefficient dpublic Point transform(Point point)
point - The Point to transformpublic Point transform(Point point, double scale)
point - The Point to transformscale - The applied scale factorpublic Point untransform(Point point)
point - The Point to reverse transformCopyright © 2017. All rights reserved.