public class RMTransform
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
double |
_a |
double |
_b |
double |
_c |
double |
_d |
double |
_tx |
double |
_ty |
static RMTransform |
identity |
Constructor and Description |
---|
RMTransform()
Creates a new identity transform.
|
RMTransform(double a,
double b,
double c,
double d,
double tx,
double ty)
Creates a transform initialized to given matrix components.
|
RMTransform(double dx,
double dy,
double angle,
double sx,
double sy,
double skx,
double sky)
Create a transform with translation, rotation, and skew.
|
RMTransform(double dx,
double dy,
double anAngle,
double porx,
double pory,
double sx,
double sy,
double skx,
double sky)
Creates a transform with translation and given rotation/skew about a point.
|
RMTransform(RMTransform aTransform)
Creates a new transform from a given transform.
|
Modifier and Type | Method and Description |
---|---|
double |
a()
Returns the first component of the transform matrix.
|
java.awt.geom.AffineTransform |
awt()
Returns AWT version of transform for use with Java2D (caching it if needed).
|
double |
b()
Returns the second component of the transform matrix.
|
double |
c()
Returns the third component of the transform matrix.
|
java.lang.Object |
clone()
Standard clone implementation.
|
double |
d()
Returns the fourth component of the transform matrix.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
RMTransform |
invert()
Inverts this transform (and returns this for convenience).
|
boolean |
isIdentity()
Returns whether this transform is identity.
|
RMTransform |
multiply(double a,
double b,
double c,
double d,
double tx,
double ty)
Multiplies this transform by the given transform components (return this for convenience).
|
RMTransform |
multiply(RMTransform aTransform)
Multiplies this transform by the given transform.
|
RMTransform |
rotate(double anAngle)
Rotates this transform by given angle in degrees (returns this for convenience).
|
RMTransform |
scale(double sx,
double sy)
Scales this transform by given scale x and scale y (returns this for convenience).
|
RMTransform |
skew(double aSkewX,
double aSkewY)
Skews this transform by given skew x and skew y angles in degrees (returns this for convenience).
|
java.lang.String |
toString()
Returns a string representation of the transform.
|
RMPoint |
transform(RMPoint aPoint)
Transforms the given point.
|
RMRect |
transform(RMRect aRect)
Transforms the given rect.
|
RMSize |
transform(RMSize aSize)
Transforms the given size.
|
RMSize |
transformVector(RMSize aSize)
Transforms the given size as a vector (preserves negative values).
|
RMTransform |
translate(double dx,
double dy)
Translates this transform by given x & y (returns this for convenience).
|
double |
tx()
Returns the x translation component of the transform matrix.
|
double |
ty()
Returns the y translation component of the transform matrix.
|
public double _a
public double _b
public double _c
public double _d
public double _tx
public double _ty
public static final RMTransform identity
public RMTransform()
public RMTransform(RMTransform aTransform)
public RMTransform(double a, double b, double c, double d, double tx, double ty)
public RMTransform(double dx, double dy, double angle, double sx, double sy, double skx, double sky)
public RMTransform(double dx, double dy, double anAngle, double porx, double pory, double sx, double sy, double skx, double sky)
public double a()
public double b()
public double c()
public double d()
public double tx()
public double ty()
public boolean isIdentity()
public RMTransform translate(double dx, double dy)
public RMTransform rotate(double anAngle)
public RMTransform scale(double sx, double sy)
public RMTransform skew(double aSkewX, double aSkewY)
public RMTransform multiply(RMTransform aTransform)
public RMTransform multiply(double a, double b, double c, double d, double tx, double ty)
public RMTransform invert()
public RMSize transformVector(RMSize aSize)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public java.awt.geom.AffineTransform awt()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object