Package com.reportmill.graphics
Class RMTransform
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.graphics.RMTransform
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
This class represents a simple 2D transform.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new identity transform.RMTransform(float a, float b, float c, float d, float tx, float ty) Creates a transform initialized to given matrix components.RMTransform(float dx, float dy, float angle, float sx, float sy, float skx, float sky) Create a transform with translation, rotation, and skew.RMTransform(float dx, float dy, float anAngle, float porx, float pory, float sx, float sy, float skx, float sky) Creates a transform with translation and given rotation/skew about a point.RMTransform(RMTransform aTransform) Creates a new transform from a given transform.
- 
Method SummaryModifier and TypeMethodDescriptionfloata()Returns the first component of the transform matrix.awt()Returns AWT version of transform for use with Java2D (caching it if needed).floatb()Returns the second component of the transform matrix.floatc()Returns the third component of the transform matrix.floatd()Returns the fourth component of the transform matrix.booleanStandard equals implementation.invert()Inverts this transform (and returns this for convenience).booleanReturns whether this transform is identity.multiply(float a, float b, float c, float d, float tx, float ty) Multiplies this transform by the given transform components (return this for convenience).multiply(RMTransform aTransform) Multiplies this transform by the given transform.rotate(float anAngle) Rotates this transform by given angle in degrees (returns this for convenience).scale(float sx, float sy) Scales this transform by given scale x and scale y (returns this for convenience).skew(float aSkewX, float aSkewY) Skews this transform by given skew x and skew y angles in degrees (returns this for convenience).toString()Returns a string representation of the transform.Transforms the given point.Transforms the given rect.Transforms the given size.transformVector(RMSize aSize) Transforms the given size as a vector (preserves negative values).translate(float dx, float dy) Translates this transform by given x & y (returns this for convenience).floattx()Returns the x translation component of the transform matrix.floatty()Returns the y translation component of the transform matrix.Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
- 
Field Details- 
_apublic float _a
- 
_bpublic float _b
- 
_cpublic float _c
- 
_dpublic float _d
- 
_txpublic float _tx
- 
_typublic float _ty
- 
identity
 
- 
- 
Constructor Details- 
RMTransformpublic RMTransform()Creates a new identity transform.
- 
RMTransformCreates a new transform from a given transform.
- 
RMTransformpublic RMTransform(float a, float b, float c, float d, float tx, float ty) Creates a transform initialized to given matrix components.
- 
RMTransformpublic RMTransform(float dx, float dy, float angle, float sx, float sy, float skx, float sky) Create a transform with translation, rotation, and skew.
- 
RMTransformpublic RMTransform(float dx, float dy, float anAngle, float porx, float pory, float sx, float sy, float skx, float sky) Creates a transform with translation and given rotation/skew about a point.
 
- 
- 
Method Details- 
apublic float a()Returns the first component of the transform matrix.
- 
bpublic float b()Returns the second component of the transform matrix.
- 
cpublic float c()Returns the third component of the transform matrix.
- 
dpublic float d()Returns the fourth component of the transform matrix.
- 
txpublic float tx()Returns the x translation component of the transform matrix.
- 
typublic float ty()Returns the y translation component of the transform matrix.
- 
isIdentitypublic boolean isIdentity()Returns whether this transform is identity.
- 
translateTranslates this transform by given x & y (returns this for convenience).
- 
rotateRotates this transform by given angle in degrees (returns this for convenience).
- 
scaleScales this transform by given scale x and scale y (returns this for convenience).
- 
skewSkews this transform by given skew x and skew y angles in degrees (returns this for convenience).
- 
multiplyMultiplies this transform by the given transform.
- 
multiplyMultiplies this transform by the given transform components (return this for convenience).
- 
invertInverts this transform (and returns this for convenience).
- 
transformTransforms the given point.
- 
transformTransforms the given size.
- 
transformTransforms the given rect.
- 
transformVectorTransforms the given size as a vector (preserves negative values).
- 
equalsStandard equals implementation.
- 
awtReturns AWT version of transform for use with Java2D (caching it if needed).
- 
toStringReturns a string representation of the transform.
 
-