Java Doc for AffineTransform.java in  » Scripting » hecl » org » awt » geom » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » hecl » org.awt.geom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.awt.geom.AffineTransform

AffineTransform
public class AffineTransform (Code)
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines. Affine transformations can be constructed using sequences of translations, scales, flips, rotations, and shears.

Such a coordinate transformation can be represented by a 3 row by 3 column matrix with an implied last row of [ 0 0 1 ]. This matrix transforms source coordinates (x, y) into destination coordinates (x', y') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:

 [ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
 [ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
 [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
 


Field Summary
final static  intAPPLY_IDENTITY
     This constant is used for the internal state variable to indicate that no calculations need to be performed and that the source coordinates only need to be copied to their destinations to complete the transformation equation of this transform.
final static  intAPPLY_SCALE
     This constant is used for the internal state variable to indicate that the scaling components of the matrix (m00 and m11) need to be factored in to complete the transformation equation of this transform.
final static  intAPPLY_SHEAR
     This constant is used for the internal state variable to indicate that the shearing components of the matrix (m01 and m10) need to be factored in to complete the transformation equation of this transform.
final static  intAPPLY_TRANSLATE
     This constant is used for the internal state variable to indicate that the translation components of the matrix (m02 and m12) need to be added to complete the transformation equation of this transform.
final public static  intTYPE_FLIP
     This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits.
final public static  intTYPE_GENERAL_ROTATION
     This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits.
final public static  intTYPE_GENERAL_SCALE
     This flag bit indicates that the transform defined by this object performs a general scale in addition to the conversions indicated by other flag bits.
final public static  intTYPE_GENERAL_TRANSFORM
     This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates.
final public static  intTYPE_IDENTITY
     This constant indicates that the transform defined by this object is an identity transform.
final public static  intTYPE_MASK_ROTATION
     This constant is a bit mask for any of the rotation flag bits.
final public static  intTYPE_MASK_SCALE
     This constant is a bit mask for any of the scale flag bits.
final public static  intTYPE_QUADRANT_ROTATION
     This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits.
final public static  intTYPE_TRANSLATION
     This flag bit indicates that the transform defined by this object performs a translation in addition to the conversions indicated by other flag bits.
final public static  intTYPE_UNIFORM_SCALE
     This flag bit indicates that the transform defined by this object performs a uniform scale in addition to the conversions indicated by other flag bits.
 doublem00
     The X coordinate scaling element of the 3x3 affine transformation matrix.
 doublem01
     The X coordinate shearing element of the 3x3 affine transformation matrix.
 doublem02
     The X coordinate of the translation element of the 3x3 affine transformation matrix.
 doublem10
     The Y coordinate shearing element of the 3x3 affine transformation matrix.
 doublem11
     The Y coordinate scaling element of the 3x3 affine transformation matrix.
 doublem12
     The Y coordinate of the translation element of the 3x3 affine transformation matrix.
transient  intstate
     This field keeps track of which components of the matrix need to be applied when performing a transformation.

Constructor Summary
public  AffineTransform()
     Constructs a new AffineTransform representing the Identity transformation.
public  AffineTransform(AffineTransform Tx)
     Constructs a new AffineTransform that is a copy of the specified AffineTransform object.
public  AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)
     Constructs a new AffineTransform from 6 floating point values representing the 6 specifiable entries of the 3x3 transformation matrix.
public  AffineTransform(float[] flatmatrix)
     Constructs a new AffineTransform from an array of floating point values representing either the 4 non-translation enries or the 6 specifiable entries of the 3x3 transformation matrix.
public  AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12)
     Constructs a new AffineTransform from 6 double precision values representing the 6 specifiable entries of the 3x3 transformation matrix.
public  AffineTransform(double[] flatmatrix)
     Constructs a new AffineTransform from an array of double precision values representing either the 4 non-translation entries or the 6 specifiable entries of the 3x3 transformation matrix.

Method Summary
public  Objectclone()
    
public  voidconcatenate(AffineTransform Tx)
     Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx.
public  AffineTransformcreateInverse()
     Returns an AffineTransform object representing the inverse transformation.
public  ShapecreateTransformedShape(Shape pSrc)
    
public  Point2DdeltaTransform(Point2D ptSrc, Point2D ptDst)
     Transforms the relative distance vector specified by ptSrc and stores the result in ptDst.
public  voiddeltaTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms an array of relative distance vectors by this transform. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
 [  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
 [  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
 [ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
 
The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source distance vectors.Each vector is stored as a pair of relative x, y coordinates.
Parameters:
  dstPts - the array into which the transformed distance vectorsare returned.
public  booleanequals(Object obj)
     Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.
public  doublegetDeterminant()
     Returns the determinant of the matrix representation of the transform.
public  voidgetMatrix(double[] flatmatrix)
     Retrieves the 6 specifiable values in the 3x3 affine transformation matrix and places them into an array of double precisions values.
public static  AffineTransformgetRotateInstance(double theta)
     Returns a transform representing a rotation transformation.
public static  AffineTransformgetRotateInstance(double theta, double x, double y)
     Returns a transform that rotates coordinates around an anchor point.
public static  AffineTransformgetScaleInstance(double sx, double sy)
     Returns a transform representing a scaling transformation.
public  doublegetScaleX()
     Returns the X coordinate scaling element (m00) of the 3x3 affine transformation matrix.
public  doublegetScaleY()
     Returns the Y coordinate scaling element (m11) of the 3x3 affine transformation matrix.
public static  AffineTransformgetShearInstance(double shx, double shy)
     Returns a transform representing a shearing transformation.
public  doublegetShearX()
     Returns the X coordinate shearing element (m01) of the 3x3 affine transformation matrix.
public  doublegetShearY()
     Returns the Y coordinate shearing element (m10) of the 3x3 affine transformation matrix.
public static  AffineTransformgetTranslateInstance(double tx, double ty)
     Returns a transform representing a translation transformation.
public  doublegetTranslateX()
     Returns the X coordinate of the translation element (m02) of the 3x3 affine transformation matrix.
public  doublegetTranslateY()
     Returns the Y coordinate of the translation element (m12) of the 3x3 affine transformation matrix. a double value that is the Y coordinate of the translationelement of the affine transformation matrix.
public  intgetType()
     Retrieves the flag bits describing the conversion properties of this transform.
public  inthashCode()
     Returns the hashcode for this transform.
public  Point2DinverseTransform(Point2D ptSrc, Point2D ptDst)
     Inverse transforms the specified ptSrc and stores the result in ptDst.
public  voidinverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Inverse transforms an array of double precision coordinates by this transform.
public  booleanisIdentity()
     Returns true if this AffineTransform is an identity transform.
public  voidpreConcatenate(AffineTransform Tx)
     Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space.
public  voidrotate(double theta)
     Concatenates this transform with a rotation transformation.
public  voidrotate(double theta, double x, double y)
     Concatenates this transform with a transform that rotates coordinates around an anchor point.
public  voidscale(double sx, double sy)
     Concatenates this transform with a scaling transformation.
public  voidsetToIdentity()
     Resets this transform to the Identity transform.
public  voidsetToRotation(double theta)
     Sets this transform to a rotation transformation.
public  voidsetToRotation(double theta, double x, double y)
     Sets this transform to a translated rotation transformation.
public  voidsetToScale(double sx, double sy)
     Sets this transform to a scaling transformation.
public  voidsetToShear(double shx, double shy)
     Sets this transform to a shearing transformation.
public  voidsetToTranslation(double tx, double ty)
     Sets this transform to a translation transformation.
public  voidsetTransform(AffineTransform Tx)
     Sets this transform to a copy of the transform in the specified AffineTransform object.
public  voidsetTransform(double m00, double m10, double m01, double m11, double m02, double m12)
     Sets this transform to the matrix specified by the 6 double precision values.
public  voidshear(double shx, double shy)
     Concatenates this transform with a shearing transformation.
public  StringtoString()
     Returns a String that represents the value of this Object .
public  Point2Dtransform(Point2D ptSrc, Point2D ptDst)
     Transforms the specified ptSrc and stores the result in ptDst.
public  voidtransform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts)
     Transforms an array of point objects by this transform.
public  voidtransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
     Transforms an array of floating point coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed point coordinatesare returned.
public  voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed pointcoordinates are returned.
public  voidtransform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms an array of floating point coordinates by this transform and stores the results into an array of doubles. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed point coordinatesare returned.
public  voidtransform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
     Transforms an array of double precision coordinates by this transform and stores the results into an array of floats. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed pointcoordinates are returned.
public  voidtranslate(double tx, double ty)
     Concatenates this transform with a translation transformation.
 voidupdateState()
     Manually recalculates the state of the transform when the matrix changes too much to predict the effects on the state.

Field Detail
APPLY_IDENTITY
final static int APPLY_IDENTITY(Code)
This constant is used for the internal state variable to indicate that no calculations need to be performed and that the source coordinates only need to be copied to their destinations to complete the transformation equation of this transform.
See Also:   AffineTransform.APPLY_TRANSLATE
See Also:   AffineTransform.APPLY_SCALE
See Also:   AffineTransform.APPLY_SHEAR
See Also:   AffineTransform.state



APPLY_SCALE
final static int APPLY_SCALE(Code)
This constant is used for the internal state variable to indicate that the scaling components of the matrix (m00 and m11) need to be factored in to complete the transformation equation of this transform. If the APPLY_SHEAR bit is also set then it indicates that the scaling components are not both 0.0. If the APPLY_SHEAR bit is not also set then it indicates that the scaling components are not both 1.0. If neither the APPLY_SHEAR nor the APPLY_SCALE bits are set then the scaling components are both 1.0, which means that the x and y components contribute to the transformed coordinate, but they are not multiplied by any scaling factor.
See Also:   AffineTransform.APPLY_IDENTITY
See Also:   AffineTransform.APPLY_TRANSLATE
See Also:   AffineTransform.APPLY_SHEAR
See Also:   AffineTransform.state



APPLY_SHEAR
final static int APPLY_SHEAR(Code)
This constant is used for the internal state variable to indicate that the shearing components of the matrix (m01 and m10) need to be factored in to complete the transformation equation of this transform. The presence of this bit in the state variable changes the interpretation of the APPLY_SCALE bit as indicated in its documentation.
See Also:   AffineTransform.APPLY_IDENTITY
See Also:   AffineTransform.APPLY_TRANSLATE
See Also:   AffineTransform.APPLY_SCALE
See Also:   AffineTransform.state



APPLY_TRANSLATE
final static int APPLY_TRANSLATE(Code)
This constant is used for the internal state variable to indicate that the translation components of the matrix (m02 and m12) need to be added to complete the transformation equation of this transform.
See Also:   AffineTransform.APPLY_IDENTITY
See Also:   AffineTransform.APPLY_SCALE
See Also:   AffineTransform.APPLY_SHEAR
See Also:   AffineTransform.state



TYPE_FLIP
final public static int TYPE_FLIP(Code)
This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits. A right handed coordinate system is one where the positive X axis rotates counterclockwise to overlay the positive Y axis similar to the direction that the fingers on your right hand curl when you stare end on at your thumb. A left handed coordinate system is one where the positive X axis rotates clockwise to overlay the positive Y axis similar to the direction that the fingers on your left hand curl. There is no mathematical way to determine the angle of the original flipping or mirroring transformation since all angles of flip are identical given an appropriate adjusting rotation.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



TYPE_GENERAL_ROTATION
final public static int TYPE_GENERAL_ROTATION(Code)
This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TYPE_QUADRANT_ROTATION flag.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



TYPE_GENERAL_SCALE
final public static int TYPE_GENERAL_SCALE(Code)
This flag bit indicates that the transform defined by this object performs a general scale in addition to the conversions indicated by other flag bits. A general scale multiplies the length of vectors by different amounts in the x and y directions without changing the angle between perpendicular vectors. This flag bit is mutually exclusive with the TYPE_UNIFORM_SCALE flag.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



TYPE_GENERAL_TRANSFORM
final public static int TYPE_GENERAL_TRANSFORM(Code)
This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates. If this transform can be classified by any of the above constants, the type will either be the constant TYPE_IDENTITY or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.getType



TYPE_IDENTITY
final public static int TYPE_IDENTITY(Code)
This constant indicates that the transform defined by this object is an identity transform. An identity transform is one in which the output coordinates are always the same as the input coordinates. If this transform is anything other than the identity transform, the type will either be the constant GENERAL_TRANSFORM or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



TYPE_MASK_ROTATION
final public static int TYPE_MASK_ROTATION(Code)
This constant is a bit mask for any of the rotation flag bits.
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION



TYPE_MASK_SCALE
final public static int TYPE_MASK_SCALE(Code)
This constant is a bit mask for any of the scale flag bits.
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE



TYPE_QUADRANT_ROTATION
final public static int TYPE_QUADRANT_ROTATION(Code)
This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TYPE_GENERAL_ROTATION flag.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



TYPE_TRANSLATION
final public static int TYPE_TRANSLATION(Code)
This flag bit indicates that the transform defined by this object performs a translation in addition to the conversions indicated by other flag bits. A translation moves the coordinates by a constant amount in x and y without changing the length or angle of vectors.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



TYPE_UNIFORM_SCALE
final public static int TYPE_UNIFORM_SCALE(Code)
This flag bit indicates that the transform defined by this object performs a uniform scale in addition to the conversions indicated by other flag bits. A uniform scale multiplies the length of vectors by the same amount in both the x and y directions without changing the angle between vectors. This flag bit is mutually exclusive with the TYPE_GENERAL_SCALE flag.
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_FLIP
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM
See Also:   AffineTransform.getType



m00
double m00(Code)
The X coordinate scaling element of the 3x3 affine transformation matrix.



m01
double m01(Code)
The X coordinate shearing element of the 3x3 affine transformation matrix.



m02
double m02(Code)
The X coordinate of the translation element of the 3x3 affine transformation matrix.



m10
double m10(Code)
The Y coordinate shearing element of the 3x3 affine transformation matrix.



m11
double m11(Code)
The Y coordinate scaling element of the 3x3 affine transformation matrix.



m12
double m12(Code)
The Y coordinate of the translation element of the 3x3 affine transformation matrix.



state
transient int state(Code)
This field keeps track of which components of the matrix need to be applied when performing a transformation.
See Also:   AffineTransform.APPLY_IDENTITY
See Also:   AffineTransform.APPLY_TRANSLATE
See Also:   AffineTransform.APPLY_SCALE
See Also:   AffineTransform.APPLY_SHEAR




Constructor Detail
AffineTransform
public AffineTransform()(Code)
Constructs a new AffineTransform representing the Identity transformation.



AffineTransform
public AffineTransform(AffineTransform Tx)(Code)
Constructs a new AffineTransform that is a copy of the specified AffineTransform object.
Parameters:
  Tx - the AffineTransform object to copy



AffineTransform
public AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)(Code)
Constructs a new AffineTransform from 6 floating point values representing the 6 specifiable entries of the 3x3 transformation matrix. m00, m01, m02, m10, m11, m12 the 6 floating point values that compose the 3x3 transformation matrix



AffineTransform
public AffineTransform(float[] flatmatrix)(Code)
Constructs a new AffineTransform from an array of floating point values representing either the 4 non-translation enries or the 6 specifiable entries of the 3x3 transformation matrix. The values are retrieved from the array as { m00 m10 m01 m11 [m02 m12]}.
Parameters:
  flatmatrix - the float array containing the values to be setin the new AffineTransform object. The length of thearray is assumed to be at least 4. If the length of the array is less than 6, only the first 4 values are taken. If the length ofthe array is greater than 6, the first 6 values are taken.



AffineTransform
public AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12)(Code)
Constructs a new AffineTransform from 6 double precision values representing the 6 specifiable entries of the 3x3 transformation matrix. m00, m01, m02, m10, m11, m12 the 6 floating point values that compose the 3x3 transformation matrix



AffineTransform
public AffineTransform(double[] flatmatrix)(Code)
Constructs a new AffineTransform from an array of double precision values representing either the 4 non-translation entries or the 6 specifiable entries of the 3x3 transformation matrix. The values are retrieved from the array as { m00 m10 m01 m11 [m02 m12]}.
Parameters:
  flatmatrix - the double array containing the values to be setin the new AffineTransform object. The length of thearray is assumed to be at least 4. If the length of the array is less than 6, only the first 4 values are taken. If the length ofthe array is greater than 6, the first 6 values are taken.




Method Detail
clone
public Object clone()(Code)



concatenate
public void concatenate(AffineTransform Tx)(Code)
Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx. Cx is updated to perform the combined transformation. Transforming a point p by the updated transform Cx' is equivalent to first transforming p by Tx and then transforming the result by the original transform Cx like this: Cx'(p) = Cx(Tx(p)) In matrix notation, if this transform Cx is represented by the matrix [this] and Tx is represented by the matrix [Tx] then this method does the following:
 [this] = [this] x [Tx]
 

Parameters:
  Tx - the AffineTransform object to beconcatenated with this AffineTransform object.
See Also:   AffineTransform.preConcatenate



createInverse
public AffineTransform createInverse() throws NoninvertibleTransformException(Code)
Returns an AffineTransform object representing the inverse transformation. The inverse transform Tx' of this transform Tx maps coordinates transformed by Tx back to their original coordinates. In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)).

If this transform maps all coordinates onto a point or a line then it will not have an inverse, since coordinates that do not lie on the destination point or line will not have an inverse mapping. The getDeterminant method can be used to determine if this transform has no inverse, in which case an exception will be thrown if the createInverse method is called. a new AffineTransform object representing theinverse transformation.
See Also:   AffineTransform.getDeterminant
exception:
  NoninvertibleTransformException - if the matrix cannot be inverted.




createTransformedShape
public Shape createTransformedShape(Shape pSrc)(Code)



deltaTransform
public Point2D deltaTransform(Point2D ptSrc, Point2D ptDst)(Code)
Transforms the relative distance vector specified by ptSrc and stores the result in ptDst. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
 [  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
 [  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
 [ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
 
If ptDst is null, a new Point2D object is allocated and then the result of the transform is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters:
  ptSrc - the distance vector to be delta transformed
Parameters:
  ptDst - the resulting transformed distance vector ptDst, which contains the result of thetransformation.



deltaTransform
public void deltaTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of relative distance vectors by this transform. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
 [  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
 [  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
 [ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
 
The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source distance vectors.Each vector is stored as a pair of relative x, y coordinates.
Parameters:
  dstPts - the array into which the transformed distance vectorsare returned. Each vector is stored as a pair of relativex, y coordinates.
Parameters:
  srcOff - the offset to the first vector to be transformedin the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed vector that is stored in the destination array
Parameters:
  numPts - the number of vector coordinate pairs to betransformed



equals
public boolean equals(Object obj)(Code)
Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.
Parameters:
  obj - the Object to test for equality with thisAffineTransform true if obj equals thisAffineTransform object; false otherwise.



getDeterminant
public double getDeterminant()(Code)
Returns the determinant of the matrix representation of the transform. The determinant is useful both to determine if the transform can be inverted and to get a single value representing the combined X and Y scaling of the transform.

If the determinant is non-zero, then this transform is invertible and the various methods that depend on the inverse transform do not need to throw a NoninvertibleTransformException . If the determinant is zero then this transform can not be inverted since the transform maps all input coordinates onto a line or a point. If the determinant is near enough to zero then inverse transform operations might not carry enough precision to produce meaningful results.

If this transform represents a uniform scale, as indicated by the getType method then the determinant also represents the square of the uniform scale factor by which all of the points are expanded from or contracted towards the origin. If this transform represents a non-uniform scale or more general transform then the determinant is not likely to represent a value useful for any purpose other than determining if inverse transforms are possible.

Mathematically, the determinant is calculated using the formula:

 |  m00  m01  m02  |
 |  m10  m11  m12  |  =  m00 * m11 - m01 * m10
 |   0    0    1   |
 
the determinant of the matrix used to transform thecoordinates.
See Also:   AffineTransform.getType
See Also:   AffineTransform.createInverse
See Also:   AffineTransform.inverseTransform
See Also:   AffineTransform.TYPE_UNIFORM_SCALE



getMatrix
public void getMatrix(double[] flatmatrix)(Code)
Retrieves the 6 specifiable values in the 3x3 affine transformation matrix and places them into an array of double precisions values. The values are stored in the array as { m00 m10 m01 m11 m02 m12 }. An array of 4 doubles can also be specified, in which case only the first four elements representing the non-transform parts of the array are retrieved and the values are stored into the array as { m00 m10 m01 m11 }
Parameters:
  flatmatrix - the double array used to store the returnedvalues.
See Also:   AffineTransform.getScaleX
See Also:   AffineTransform.getScaleY
See Also:   AffineTransform.getShearX
See Also:   AffineTransform.getShearY
See Also:   AffineTransform.getTranslateX
See Also:   AffineTransform.getTranslateY



getRotateInstance
public static AffineTransform getRotateInstance(double theta)(Code)
Returns a transform representing a rotation transformation. The matrix representing the returned transform is:
 [   cos(theta)    -sin(theta)    0   ]
 [   sin(theta)     cos(theta)    0   ]
 [       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
  theta - the angle of rotation in radians an AffineTransform object that is a rotationtransformation, created with the specified angle of rotation.



getRotateInstance
public static AffineTransform getRotateInstance(double theta, double x, double y)(Code)
Returns a transform that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

 AffineTransform Tx = new AffineTransform();
 Tx.setToTranslation(x, y);	// S3: final translation
 Tx.rotate(theta);		// S2: rotate around anchor
 Tx.translate(-x, -y);	// S1: translate anchor to origin
 
The matrix representing the returned transform is:
 [   cos(theta)    -sin(theta)    x-x*cos+y*sin  ]
 [   sin(theta)     cos(theta)    y-x*sin-y*cos  ]
 [       0              0               1        ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
  theta - the angle of rotation in radians x, y the coordinates of the anchor point of therotation an AffineTransform object that rotates coordinates around the specified point by the specified angle ofrotation.



getScaleInstance
public static AffineTransform getScaleInstance(double sx, double sy)(Code)
Returns a transform representing a scaling transformation. The matrix representing the returned transform is:
 [   sx   0    0   ]
 [   0    sy   0   ]
 [   0    0    1   ]
 

Parameters:
  sx - the factor by which coordinates are scaled along theX axis direction
Parameters:
  sy - the factor by which coordinates are scaled along theY axis direction an AffineTransform object that scales coordinates by the specified factors.



getScaleX
public double getScaleX()(Code)
Returns the X coordinate scaling element (m00) of the 3x3 affine transformation matrix. a double value that is the X coordinate of the scalingelement of the affine transformation matrix.
See Also:   AffineTransform.getMatrix



getScaleY
public double getScaleY()(Code)
Returns the Y coordinate scaling element (m11) of the 3x3 affine transformation matrix. a double value that is the Y coordinate of the scalingelement of the affine transformation matrix.
See Also:   AffineTransform.getMatrix



getShearInstance
public static AffineTransform getShearInstance(double shx, double shy)(Code)
Returns a transform representing a shearing transformation. The matrix representing the returned transform is:
 [   1   shx   0   ]
 [  shy   1    0   ]
 [   0    0    1   ]
 

Parameters:
  shx - the multiplier by which coordinates are shifted in thedirection of the positive X axis as a factor of their Y coordinate
Parameters:
  shy - the multiplier by which coordinates are shifted in thedirection of the positive Y axis as a factor of their X coordinate an AffineTransform object that shears coordinates by the specified multipliers.



getShearX
public double getShearX()(Code)
Returns the X coordinate shearing element (m01) of the 3x3 affine transformation matrix. a double value that is the X coordinate of the shearingelement of the affine transformation matrix.
See Also:   AffineTransform.getMatrix



getShearY
public double getShearY()(Code)
Returns the Y coordinate shearing element (m10) of the 3x3 affine transformation matrix. a double value that is the Y coordinate of the shearingelement of the affine transformation matrix.
See Also:   AffineTransform.getMatrix



getTranslateInstance
public static AffineTransform getTranslateInstance(double tx, double ty)(Code)
Returns a transform representing a translation transformation. The matrix representing the returned transform is:
 [   1    0    tx  ]
 [   0    1    ty  ]
 [   0    0    1   ]
 

Parameters:
  tx - the distance by which coordinates are translated in theX axis direction
Parameters:
  ty - the distance by which coordinates are translated in theY axis direction an AffineTransform object that represents atranslation transformation, created with the specified vector.



getTranslateX
public double getTranslateX()(Code)
Returns the X coordinate of the translation element (m02) of the 3x3 affine transformation matrix. a double value that is the X coordinate of the translationelement of the affine transformation matrix.
See Also:   AffineTransform.getMatrix



getTranslateY
public double getTranslateY()(Code)
Returns the Y coordinate of the translation element (m12) of the 3x3 affine transformation matrix. a double value that is the Y coordinate of the translationelement of the affine transformation matrix.
See Also:   AffineTransform.getMatrix



getType
public int getType()(Code)
Retrieves the flag bits describing the conversion properties of this transform. The return value is either one of the constants TYPE_IDENTITY or TYPE_GENERAL_TRANSFORM, or a combination of the appriopriate flag bits. A valid combination of flag bits is an exclusive OR operation that can combine the TYPE_TRANSLATION flag bit in addition to either of the TYPE_UNIFORM_SCALE or TYPE_GENERAL_SCALE flag bits as well as either of the TYPE_QUADRANT_ROTATION or TYPE_GENERAL_ROTATION flag bits. the OR combination of any of the indicated flags thatapply to this transform
See Also:   AffineTransform.TYPE_IDENTITY
See Also:   AffineTransform.TYPE_TRANSLATION
See Also:   AffineTransform.TYPE_UNIFORM_SCALE
See Also:   AffineTransform.TYPE_GENERAL_SCALE
See Also:   AffineTransform.TYPE_QUADRANT_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_ROTATION
See Also:   AffineTransform.TYPE_GENERAL_TRANSFORM



hashCode
public int hashCode()(Code)
Returns the hashcode for this transform. a hash code for this transform.



inverseTransform
public Point2D inverseTransform(Point2D ptSrc, Point2D ptDst) throws NoninvertibleTransformException(Code)
Inverse transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object is allocated and then the result of the transform is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters:
  ptSrc - the point to be inverse transformed
Parameters:
  ptDst - the resulting transformed point ptDst, which contains the result of the inverse transform.
exception:
  NoninvertibleTransformException - if the matrix cannot beinverted.



inverseTransform
public void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NoninvertibleTransformException(Code)
Inverse transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed pointcoordinates are returned. Each point is stored as a pair of x, y coordinates.
Parameters:
  srcOff - the offset to the first point to be transformedin the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed point that is stored in the destination array
Parameters:
  numPts - the number of point objects to be transformed
exception:
  NoninvertibleTransformException - if the matrix cannot beinverted.



isIdentity
public boolean isIdentity()(Code)
Returns true if this AffineTransform is an identity transform. true if this AffineTransform isan identity transform; false otherwise.



preConcatenate
public void preConcatenate(AffineTransform Tx)(Code)
Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space. Cx is updated to perform the combined transformation. Transforming a point p by the updated transform Cx' is equivalent to first transforming p by the original transform Cx and then transforming the result by Tx like this: Cx'(p) = Tx(Cx(p)) In matrix notation, if this transform Cx is represented by the matrix [this] and Tx is represented by the matrix [Tx] then this method does the following:
 [this] = [Tx] x [this]
 

Parameters:
  Tx - the AffineTransform object to beconcatenated with this AffineTransform object.
See Also:   AffineTransform.concatenate



rotate
public void rotate(double theta)(Code)
Concatenates this transform with a rotation transformation. This is equivalent to calling concatenate(R), where R is an AffineTransform represented by the following matrix:
 [   cos(theta)    -sin(theta)    0   ]
 [   sin(theta)     cos(theta)    0   ]
 [       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
  theta - the angle of rotation in radians



rotate
public void rotate(double theta, double x, double y)(Code)
Concatenates this transform with a transform that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

 translate(x, y);	// S3: final translation
 rotate(theta);		// S2: rotate around anchor
 translate(-x, -y);	// S1: translate anchor to origin
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
  theta - the angle of rotation in radians x, y the coordinates of the anchor point of therotation



scale
public void scale(double sx, double sy)(Code)
Concatenates this transform with a scaling transformation. This is equivalent to calling concatenate(S), where S is an AffineTransform represented by the following matrix:
 [   sx   0    0   ]
 [   0    sy   0   ]
 [   0    0    1   ]
 

Parameters:
  sx - the factor by which coordinates are scaled along the X axis direction
Parameters:
  sy - the factor by which coordinates are scaled along theY axis direction



setToIdentity
public void setToIdentity()(Code)
Resets this transform to the Identity transform.



setToRotation
public void setToRotation(double theta)(Code)
Sets this transform to a rotation transformation. The matrix representing this transform becomes:
 [   cos(theta)    -sin(theta)    0   ]
 [   sin(theta)     cos(theta)    0   ]
 [       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
  theta - the angle of rotation in radians



setToRotation
public void setToRotation(double theta, double x, double y)(Code)
Sets this transform to a translated rotation transformation. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

 setToTranslation(x, y);	// S3: final translation
 rotate(theta);		// S2: rotate around anchor
 translate(-x, -y);		// S1: translate anchor to origin
 
The matrix representing this transform becomes:
 [   cos(theta)    -sin(theta)    x-x*cos+y*sin  ]
 [   sin(theta)     cos(theta)    y-x*sin-y*cos  ]
 [       0              0               1        ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
  theta - the angle of rotation in radians x, y the coordinates of the anchor point of therotation



setToScale
public void setToScale(double sx, double sy)(Code)
Sets this transform to a scaling transformation. The matrix representing this transform becomes:
 [   sx   0    0   ]
 [   0    sy   0   ]
 [   0    0    1   ]
 

Parameters:
  sx - the factor by which coordinates are scaled along theX axis direction
Parameters:
  sy - the factor by which coordinates are scaled along theY axis direction



setToShear
public void setToShear(double shx, double shy)(Code)
Sets this transform to a shearing transformation. The matrix representing this transform becomes:
 [   1   shx   0   ]
 [  shy   1    0   ]
 [   0    0    1   ]
 

Parameters:
  shx - the multiplier by which coordinates are shifted in thedirection of the positive X axis as a factor of their Y coordinate
Parameters:
  shy - the multiplier by which coordinates are shifted in thedirection of the positive Y axis as a factor of their X coordinate



setToTranslation
public void setToTranslation(double tx, double ty)(Code)
Sets this transform to a translation transformation. The matrix representing this transform becomes:
 [   1    0    tx  ]
 [   0    1    ty  ]
 [   0    0    1   ]
 

Parameters:
  tx - the distance by which coordinates are translated in theX axis direction
Parameters:
  ty - the distance by which coordinates are translated in theY axis direction



setTransform
public void setTransform(AffineTransform Tx)(Code)
Sets this transform to a copy of the transform in the specified AffineTransform object.
Parameters:
  Tx - the AffineTransform object from which tocopy the transform



setTransform
public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12)(Code)
Sets this transform to the matrix specified by the 6 double precision values. m00, m01, m02, m10, m11, m12 the6 floating point values that compose the 3x3 transformation matrix



shear
public void shear(double shx, double shy)(Code)
Concatenates this transform with a shearing transformation. This is equivalent to calling concatenate(SH), where SH is an AffineTransform represented by the following matrix:
 [   1   shx   0   ]
 [  shy   1    0   ]
 [   0    0    1   ]
 

Parameters:
  shx - the multiplier by which coordinates are shifted in thedirection of the positive X axis as a factor of their Y coordinate
Parameters:
  shy - the multiplier by which coordinates are shifted in thedirection of the positive Y axis as a factor of their X coordinate



toString
public String toString()(Code)
Returns a String that represents the value of this Object . a String representing the value of thisObject.



transform
public Point2D transform(Point2D ptSrc, Point2D ptDst)(Code)
Transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object is allocated and then the result of the transformation is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters:
  ptSrc - the specified Point2D to be transformed
Parameters:
  ptDst - the specified Point2D that stores theresult of transforming ptSrc the ptDst after transformingptSrc and stroring the result in ptDst.



transform
public void transform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts)(Code)
Transforms an array of point objects by this transform. If any element of the ptDst array is null, a new Point2D object is allocated and stored into that element before storing the results of the transformation.

Note that this method does not take any precautions to avoid problems caused by storing results into Point2D objects that will be used as the source for calculations further down the source array. This method does guarantee that if a specified Point2D object is both the source and destination for the same single point transform operation then the results will not be stored until the calculations are complete to avoid storing the results on top of the operands. If, however, the destination Point2D object for one operation is the same object as the source Point2D object for another operation further down the source array then the original coordinates in that point are overwritten before they can be converted.
Parameters:
  ptSrc - the array containing the source point objects
Parameters:
  ptDst - the array into which the transform point objects arereturned
Parameters:
  srcOff - the offset to the first point object to betransformed in the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed point object that is stored in the destination array
Parameters:
  numPts - the number of point objects to be transformed




transform
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of floating point coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed point coordinatesare returned. Each point is stored as a pair of x, ycoordinates.
Parameters:
  srcOff - the offset to the first point to be transformedin the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed point that is stored in the destination array
Parameters:
  numPts - the number of points to be transformed



transform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed pointcoordinates are returned. Each point is stored as a pair ofx, y coordinates.
Parameters:
  srcOff - the offset to the first point to be transformedin the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed point that is stored in the destination array
Parameters:
  numPts - the number of point objects to be transformed



transform
public void transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of floating point coordinates by this transform and stores the results into an array of doubles. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed point coordinatesare returned. Each point is stored as a pair of x, ycoordinates.
Parameters:
  srcOff - the offset to the first point to be transformedin the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed point that is stored in the destination array
Parameters:
  numPts - the number of points to be transformed



transform
public void transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of double precision coordinates by this transform and stores the results into an array of floats. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
  srcPts - the array containing the source point coordinates.Each point is stored as a pair of x, y coordinates.
Parameters:
  dstPts - the array into which the transformed pointcoordinates are returned. Each point is stored as a pair of x, y coordinates.
Parameters:
  srcOff - the offset to the first point to be transformedin the source array
Parameters:
  dstOff - the offset to the location of the firsttransformed point that is stored in the destination array
Parameters:
  numPts - the number of point objects to be transformed



translate
public void translate(double tx, double ty)(Code)
Concatenates this transform with a translation transformation. This is equivalent to calling concatenate(T), where T is an AffineTransform represented by the following matrix:
 [   1    0    tx  ]
 [   0    1    ty  ]
 [   0    0    1   ]
 

Parameters:
  tx - the distance by which coordinates are translated in theX axis direction
Parameters:
  ty - the distance by which coordinates are translated in theY axis direction



updateState
void updateState()(Code)
Manually recalculates the state of the transform when the matrix changes too much to predict the effects on the state. The following table specifies what the various settings of the state field say about the values of the corresponding matrix element fields. Note that the rules governing the SCALE fields are slightly different depending on whether the SHEAR flag is also set.
 SCALE            SHEAR          TRANSLATE
 m00/m11          m01/m10          m02/m12
 IDENTITY             1.0              0.0              0.0
 TRANSLATE (TR)       1.0              0.0          not both 0.0
 SCALE (SC)       not both 1.0         0.0              0.0
 TR | SC          not both 1.0         0.0          not both 0.0
 SHEAR (SH)           0.0          not both 0.0         0.0
 TR | SH              0.0          not both 0.0     not both 0.0
 SC | SH          not both 0.0     not both 0.0         0.0
 TR | SC | SH     not both 0.0     not both 0.0     not both 0.0
 



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.