Class RMTransform
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.graphics.RMTransform
- All Implemented Interfaces:
- RMPropertyChanger,- Cloneable
This class represents a simple 2D transform.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCreates 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.
- 
Method SummaryModifier and TypeMethodDescriptiondoublea()Returns the first component of the transform matrix.awt()Returns AWT version of transform for use with Java2D (caching it if needed).doubleb()Returns the second component of the transform matrix.doublec()Returns the third component of the transform matrix.doubled()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(double a, double b, double c, double d, double tx, double ty) Multiplies this transform by the given transform components (return this for convenience).multiply(RMTransform aTransform) Multiplies this transform by the given transform.rotate(double anAngle) Rotates this transform by given angle in degrees (returns this for convenience).scale(double sx, double sy) Scales this transform by given scale x and scale y (returns this for convenience).skew(double aSkewX, double 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(double dx, double dy) Translates this transform by given x & y (returns this for convenience).doubletx()Returns the x translation component of the transform matrix.doublety()Returns the y translation component of the transform matrix.Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
- 
Field Details- 
_apublic double _a
- 
_bpublic double _b
- 
_cpublic double _c
- 
_dpublic double _d
- 
_txpublic double _tx
- 
_typublic double _ty
- 
identity
 
- 
- 
Constructor Details- 
RMTransformpublic RMTransform()Creates a new identity transform.
- 
RMTransformCreates a new transform from a given transform.
- 
RMTransformpublic RMTransform(double a, double b, double c, double d, double tx, double ty) Creates a transform initialized to given matrix components.
- 
RMTransformpublic RMTransform(double dx, double dy, double angle, double sx, double sy, double skx, double sky) Create a transform with translation, rotation, and skew.
- 
RMTransformpublic 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.
 
- 
- 
Method Details- 
apublic double a()Returns the first component of the transform matrix.
- 
bpublic double b()Returns the second component of the transform matrix.
- 
cpublic double c()Returns the third component of the transform matrix.
- 
dpublic double d()Returns the fourth component of the transform matrix.
- 
txpublic double tx()Returns the x translation component of the transform matrix.
- 
typublic double 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.
 
-