Modifier and Type | Field and Description |
---|---|
static double |
ACCURACY
The constant used for testing results.
|
protected double |
m00 |
protected double |
m01 |
protected double |
m02 |
protected double |
m10 |
protected double |
m11 |
protected double |
m12 |
Constructor and Description |
---|
Transform2D()
Creates a new AffineTransform2D, initialized with Identity.
|
Transform2D(AffineTransform transform)
Creates a new transform from a java AWT transform.
|
Transform2D(double[] coefs)
Creates a new Affine Transform by directly specifying the coefficients,
in the order m00, m01, m02, m10, m11, m12 (different order of
java.awt.geom.AffineTransform).
|
Transform2D(double xx,
double yx,
double tx,
double xy,
double yy,
double ty) |
Modifier and Type | Method and Description |
---|---|
double[][] |
affineMatrix()
Returns the 3x3 square matrix representing the transform.
|
AffineTransform |
asAwtTransform()
Returns this transform as an instance of java AWT AffineTransform.
|
Transform |
chain(Transform other)
Returns the affine transform created by applying first this affine
transform, then the affine transform given by
that . |
Transform2D |
clone() |
double[] |
coefficients()
Returns coefficients of the transform in a linear array of 6 double.
|
Transform |
concatenate(Transform other)
Returns the affine transform created by applying first the affine
transform given by
other , then this affine transform. |
boolean |
equals(Object obj) |
Transform |
inverse()
Returns the inverse transform.
|
boolean |
isDirect()
Tests if this affine transform is direct, i.e. the sign of the
determinant of the associated matrix is positive.
|
boolean |
isIdentity()
Tests is this affine transform is equal to the identity transform.
|
boolean |
isIsometry()
Tests if this affine transform is an isometry, i.e. is equivalent to a
compound of translations, rotations and reflections.
|
boolean |
isMotion()
Tests if this affine transform is a motion, i.e. is composed only of
rotations and translations.
|
boolean |
isSimilarity()
Tests if this affine transform is a similarity.
|
Transform |
preConcatenate(Transform other)
Return the affine transform created by applying first this affine
transform, then the affine transform given by
that . |
String |
toString()
Displays the coefficients of the transform, row by row.
|
Point |
transform(Point p)
Computes the coordinates of the transformed point.
|
Point[] |
transform(Point[] src,
Point[] dst) |
public static final double ACCURACY
protected double m00
protected double m01
protected double m02
protected double m10
protected double m11
protected double m12
public Transform2D()
public Transform2D(AffineTransform transform)
transform
- public Transform2D(double[] coefs)
coefs
- public Transform2D(double xx, double yx, double tx, double xy, double yy, double ty)
public double[] coefficients()
public double[][] affineMatrix()
public AffineTransform asAwtTransform()
public Transform concatenate(Transform other)
other
, then this affine transform. This
is the equivalent method of the 'concatenate' method in
java.awt.geom.AffineTransform.concatenate
in interface Transform
other
- the transform to apply firstpublic Transform chain(Transform other)
that
. This the
equivalent method of the 'preConcatenate' method in
java.awt.geom.AffineTransform.
shape = shape.transform(T1.chain(T2).chain(T3));
is equivalent to the sequence:
shape = shape.transform(T1);
shape = shape.transform(T2);
shape = shape.transform(T3);
other
- the transform to apply in a second steppublic Transform preConcatenate(Transform other)
that
. This the
equivalent method of the 'preConcatenate' method in
java.awt.geom.AffineTransform.preConcatenate
in interface Transform
other
- the transform to apply in a second steppublic boolean isSimilarity()
public boolean isMotion()
public boolean isIsometry()
public boolean isDirect()
public boolean isIdentity()
isIdentity
in interface Transform
public Transform inverse()
public String toString()
public Transform2D clone()