Class RMTransform
- java.lang.Object
- 
- com.inductiveautomation.rm.base.RMListenerList
- 
- com.inductiveautomation.rm.base.RMObject
- 
- com.inductiveautomation.rm.graphics.RMTransform
 
 
 
- 
- All Implemented Interfaces:
- RMPropertyChanger,- 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(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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublea()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).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.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(double a, double b, double c, double d, double tx, double ty)Multiplies this transform by the given transform components (return this for convenience).RMTransformmultiply(RMTransform aTransform)Multiplies this transform by the given transform.RMTransformrotate(double anAngle)Rotates this transform by given angle in degrees (returns this for convenience).RMTransformscale(double sx, double sy)Scales this transform by given scale x and scale y (returns this for convenience).RMTransformskew(double aSkewX, double 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(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, sendPropertyChange
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
_apublic double _a 
 - 
_bpublic double _b 
 - 
_cpublic double _c 
 - 
_dpublic double _d 
 - 
_txpublic double _tx 
 - 
_typublic double _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(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 Detail- 
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.
 - 
translatepublic RMTransform translate(double dx, double dy) Translates this transform by given x & y (returns this for convenience).
 - 
rotatepublic RMTransform rotate(double anAngle) Rotates this transform by given angle in degrees (returns this for convenience).
 - 
scalepublic RMTransform scale(double sx, double sy) Scales this transform by given scale x and scale y (returns this for convenience).
 - 
skewpublic RMTransform skew(double aSkewX, double 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(double a, double b, double c, double d, double tx, double 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).
 
- 
 
-