Package com.reportmill.graphics
Class RMTransform
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.graphics.RMTransform
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMTransform extends RMObject This class represents a simple 2D transform.
- 
- 
Constructor SummaryConstructors Constructor Description RMTransform()Creates 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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description floata()Returns the first component of the transform matrix.java.awt.geom.AffineTransformawt()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.booleanequals(java.lang.Object anObj)Standard equals implementation.RMTransforminvert()Inverts this transform (and returns this for convenience).booleanisIdentity()Returns whether this transform is identity.RMTransformmultiply(float a, float b, float c, float d, float tx, float ty)Multiplies this transform by the given transform components (return this for convenience).RMTransformmultiply(RMTransform aTransform)Multiplies this transform by the given transform.RMTransformrotate(float anAngle)Rotates this transform by given angle in degrees (returns this for convenience).RMTransformscale(float sx, float sy)Scales this transform by given scale x and scale y (returns this for convenience).RMTransformskew(float aSkewX, float aSkewY)Skews this transform by given skew x and skew y angles in degrees (returns this for convenience).java.lang.StringtoString()Returns a string representation of the transform.RMPointtransform(RMPoint aPoint)Transforms the given point.RMRecttransform(RMRect aRect)Transforms the given rect.RMSizetransform(RMSize aSize)Transforms the given size.RMSizetransformVector(RMSize aSize)Transforms the given size as a vector (preserves negative values).RMTransformtranslate(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 Detail- 
_apublic float _a 
 - 
_bpublic float _b 
 - 
_cpublic float _c 
 - 
_dpublic float _d 
 - 
_txpublic float _tx 
 - 
_typublic float _ty 
 - 
identitypublic static final RMTransform identity 
 
- 
 - 
Constructor Detail- 
RMTransformpublic RMTransform() Creates a new identity transform.
 - 
RMTransformpublic RMTransform(RMTransform aTransform) Creates 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 Detail- 
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.
 - 
translatepublic RMTransform translate(float dx, float dy) Translates this transform by given x & y (returns this for convenience).
 - 
rotatepublic RMTransform rotate(float anAngle) Rotates this transform by given angle in degrees (returns this for convenience).
 - 
scalepublic RMTransform scale(float sx, float sy) Scales this transform by given scale x and scale y (returns this for convenience).
 - 
skewpublic RMTransform skew(float aSkewX, float aSkewY) Skews this transform by given skew x and skew y angles in degrees (returns this for convenience).
 - 
multiplypublic RMTransform multiply(RMTransform aTransform) Multiplies this transform by the given transform.
 - 
multiplypublic RMTransform 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).
 - 
invertpublic RMTransform invert() Inverts this transform (and returns this for convenience).
 - 
transformVectorpublic RMSize transformVector(RMSize aSize) Transforms the given size as a vector (preserves negative values).
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
awtpublic java.awt.geom.AffineTransform awt() Returns AWT version of transform for use with Java2D (caching it if needed).
 - 
toStringpublic java.lang.String toString() Returns a string representation of the transform.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-