Java Doc for PerspectiveTransform.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » 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 » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.PerspectiveTransform

PerspectiveTransform
final public class PerspectiveTransform implements Cloneable,Serializable(Code)
A 2D perspective (or projective) transform, used by various OpImages.

A perspective transformation is capable of mapping an arbitrary quadrilateral into another arbitrary quadrilateral, while preserving the straightness of lines. Unlike an affine transformation, the parallelism of lines in the source is not necessarily preserved in the output.

Such a coordinate transformation can be represented by a 3x3 matrix which transforms homogenous source coordinates (x, y, 1) into destination coordinates (x', y', w). To convert back into non-homogenous coordinates (X, Y), x' and y' are divided by w.

 [ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
 [ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
 [ w ]   [  m20  m21  m22  ] [ 1 ]   [ m20x + m21y + m22 ]
 x' = (m00x + m01y + m02)
 y' = (m10x + m11y + m12)
 w  = (m20x + m21y + m22)
 X = x' / w
 Y = y' / w
 


Field Summary
 doublem00m01m02m10m11m12m20m21m22
     An element of the transform matrix.

Constructor Summary
public  PerspectiveTransform()
     Constructs an identity PerspectiveTransform.
public  PerspectiveTransform(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
     Constructs a new PerspectiveTransform from 9 floats.
public  PerspectiveTransform(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
     Constructs a new PerspectiveTransform from 9 doubles.
public  PerspectiveTransform(float[] flatmatrix)
     Constructs a new PerspectiveTransform from a one-dimensional array of 9 floats, in row-major order.
public  PerspectiveTransform(float[][] matrix)
     Constructs a new PerspectiveTransform from a two-dimensional array of floats.
public  PerspectiveTransform(double[] flatmatrix)
     Constructs a new PerspectiveTransform from a one-dimensional array of 9 doubles, in row-major order.
public  PerspectiveTransform(double[][] matrix)
     Constructs a new PerspectiveTransform from a two-dimensional array of doubles.
public  PerspectiveTransform(AffineTransform transform)
     Constructs a new PerspectiveTransform with the same effect as an existing AffineTransform.

Method Summary
public  Objectclone()
     Returns a copy of this PerspectiveTransform object.
public  voidconcatenate(AffineTransform Tx)
     Post-concatenates a given AffineTransform to this transform.
public  voidconcatenate(PerspectiveTransform Tx)
     Post-concatenates a given PerspectiveTransform to this transform.
public  PerspectiveTransformcreateAdjoint()
     Returns a new PerpectiveTransform that is the adjoint, of the current transform.
public  PerspectiveTransformcreateInverse()
     Returns a new PerpectiveTransform that is the inverse of the current transform.
public  booleanequals(Object obj)
     Tests if this PerspectiveTransform equals a supplied one.
public  doublegetDeterminant()
     Returns the determinant of the matrix representation of the transform.
public  double[]getMatrix(double[] flatmatrix)
     Retrieves the 9 specifiable values in the 3x3 affine transformation matrix into an array of double precision values. The values are stored into the array as { m00 m01 m02 m10 m11 m12 m20 m21 m22 }.
Parameters:
  flatmatrix - The double array used to store the returnedvalues.
public  double[][]getMatrix(double[][] matrix)
     Retrieves the 9 specifiable values in the 3x3 affine transformation matrix into a 2-dimensional array of double precision values.
public static  PerspectiveTransformgetQuadToQuad(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, double x0p, double y0p, double x1p, double y1p, double x2p, double y2p, double x3p, double y3p)
     Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto another arbitrary quadrilateral.
public static  PerspectiveTransformgetQuadToQuad(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float x0p, float y0p, float x1p, float y1p, float x2p, float y2p, float x3p, float y3p)
     Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto another arbitrary quadrilateral.
public static  PerspectiveTransformgetQuadToSquare(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
     Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto the unit square.
public static  PerspectiveTransformgetQuadToSquare(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)
     Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto the unit square.
public static  PerspectiveTransformgetSquareToQuad(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
     Creates a PerspectiveTransform that maps the unit square onto an arbitrary quadrilateral.
public static  PerspectiveTransformgetSquareToQuad(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)
     Creates a PerspectiveTransform that maps the unit square onto an arbitrary quadrilateral.
public  Point2DinverseTransform(Point2D ptSrc, Point2D ptDst)
     Inverse transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object will be allocated before storing.
public  voidinverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Inverse transforms an array of double precision coordinates by this transform.
Parameters:
  srcPts - The array containing the source point coordinates.Each point is stored as a pair of x,y coordinates.
Parameters:
  dstPts - The array where the transformed point coordinates arereturned.
public  booleanisIdentity()
     Returns the boolean true value if this PerspectiveTransform is an identity transform.
public  voidpreConcatenate(AffineTransform Tx)
     Pre-concatenates a given AffineTransform to this transform.
public  voidpreConcatenate(PerspectiveTransform Tx)
     Pre-concatenates a given PerspectiveTransform to this transform.
public  voidrotate(double theta)
     Concatenates this transform with a rotation transformation.
public  voidrotate(double theta, double x, double y)
     Concatenates this transform with a translated rotation transformation.
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 rotation transformation about a specified point (x, y).
public  voidsetToScale(double sx, double sy)
     Sets this transform to a scale transformation with scale factors sx and sy.
public  voidsetToShear(double shx, double shy)
     Sets this transform to a shearing transformation with shear factors sx and sy.
public  voidsetToTranslation(double tx, double ty)
     Sets this transform to a translation transformation.
public  voidsetTransform(AffineTransform Tx)
     Sets this transform to a given AffineTransform.
public  voidsetTransform(PerspectiveTransform Tx)
     Sets this transform to a given PerspectiveTransform.
public  voidsetTransform(float m00, float m10, float m20, float m01, float m11, float m21, float m02, float m12, float m22)
     Sets this transform to a given PerspectiveTransform, expressed by the elements of its matrix.
public  voidsetTransform(double[][] matrix)
     Sets this transform using a two-dimensional array of 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. If ptDst is null, a new Point2D object will be allocated before storing.
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.
Parameters:
  srcPts - The array containing the source point coordinates.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:
  dstPts - The array where the transformed point coordinates arereturned.
public  voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms an array of double precision coordinates by this transform.
Parameters:
  srcPts - The array containing the source point coordinates.Each point is stored as a pair of x,y coordinates.
Parameters:
  dstPts - The array where the transformed point coordinates arereturned.
public  voidtransform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms an array of floating point coordinates by this transform, storing the results into an array of doubles.
Parameters:
  srcPts - The array containing the source point coordinates.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:
  dstPts - The array where the transformed point coordinates arereturned.
public  voidtransform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
     Transforms an array of double precision coordinates by this transform, storing the results into an array of floats.
Parameters:
  srcPts - The array containing the source point coordinates.Each point is stored as a pair of x,y coordinates.
Parameters:
  dstPts - The array where the transformed point coordinates arereturned.
public  voidtranslate(double tx, double ty)
     Concatenates this transform with a translation transformation.

Field Detail
m00m01m02m10m11m12m20m21m22
double m00m01m02m10m11m12m20m21m22(Code)
An element of the transform matrix.




Constructor Detail
PerspectiveTransform
public PerspectiveTransform()(Code)
Constructs an identity PerspectiveTransform.



PerspectiveTransform
public PerspectiveTransform(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)(Code)
Constructs a new PerspectiveTransform from 9 floats.



PerspectiveTransform
public PerspectiveTransform(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)(Code)
Constructs a new PerspectiveTransform from 9 doubles.



PerspectiveTransform
public PerspectiveTransform(float[] flatmatrix)(Code)
Constructs a new PerspectiveTransform from a one-dimensional array of 9 floats, in row-major order. The values in the array are assumed to be { m00 m01 m02 m10 m11 m12 m20 m21 m22 }.
throws:
  IllegalArgumentException - if flatmatrix is null
throws:
  ArrayIndexOutOfBoundsException - if flatmatrix is too small



PerspectiveTransform
public PerspectiveTransform(float[][] matrix)(Code)
Constructs a new PerspectiveTransform from a two-dimensional array of floats.
throws:
  IllegalArgumentException - if matrix is null
throws:
  ArrayIndexOutOfBoundsException - if matrix is too small



PerspectiveTransform
public PerspectiveTransform(double[] flatmatrix)(Code)
Constructs a new PerspectiveTransform from a one-dimensional array of 9 doubles, in row-major order. The values in the array are assumed to be { m00 m01 m02 m10 m11 m12 m20 m21 m22 }.
throws:
  IllegalArgumentException - if flatmatrix is null
throws:
  ArrayIndexOutOfBoundsException - if flatmatrix is too small



PerspectiveTransform
public PerspectiveTransform(double[][] matrix)(Code)
Constructs a new PerspectiveTransform from a two-dimensional array of doubles.
throws:
  IllegalArgumentException - if matrix is null
throws:
  ArrayIndexOutOfBoundsException - if matrix is too small



PerspectiveTransform
public PerspectiveTransform(AffineTransform transform)(Code)
Constructs a new PerspectiveTransform with the same effect as an existing AffineTransform.
throws:
  IllegalArgumentException - if transform is null




Method Detail
clone
public Object clone()(Code)
Returns a copy of this PerspectiveTransform object.



concatenate
public void concatenate(AffineTransform Tx)(Code)
Post-concatenates a given AffineTransform to this transform.
throws:
  IllegalArgumentException - if Tx is null



concatenate
public void concatenate(PerspectiveTransform Tx)(Code)
Post-concatenates a given PerspectiveTransform to this transform.
throws:
  IllegalArgumentException - if Tx is null



createAdjoint
public PerspectiveTransform createAdjoint() throws CloneNotSupportedException(Code)
Returns a new PerpectiveTransform that is the adjoint, of the current transform. The adjoint is defined as the matrix of cofactors, which in turn are the determinants of the submatrices defined by removing the row and column of each element from the original matrix in turn.

The adjoint is a scalar multiple of the inverse matrix. Because points to be transformed are converted into homogeneous coordinates, where scalar factors are irrelevant, the adjoint may be used in place of the true inverse. Since it is unnecessary to normalize the adjoint, it is both faster to compute and more numerically stable than the true inverse.




createInverse
public PerspectiveTransform createInverse() throws NoninvertibleTransformException, CloneNotSupportedException(Code)
Returns a new PerpectiveTransform that is the inverse of the current transform.
throws:
  NoninvertibleTransformException - if transform cannot be inverted



equals
public boolean equals(Object obj)(Code)
Tests if this PerspectiveTransform equals a supplied one.
Parameters:
  obj - The PerspectiveTransform to be compared to this one.



getDeterminant
public double getDeterminant()(Code)
Returns the determinant of the matrix representation of the transform.



getMatrix
public double[] getMatrix(double[] flatmatrix)(Code)
Retrieves the 9 specifiable values in the 3x3 affine transformation matrix into an array of double precision values. The values are stored into the array as { m00 m01 m02 m10 m11 m12 m20 m21 m22 }.
Parameters:
  flatmatrix - The double array used to store the returnedvalues. The length of the array is assumed to be atleast 9.
throws:
  ArrayIndexOutOfBoundsException - if flatmatrix is too small



getMatrix
public double[][] getMatrix(double[][] matrix)(Code)
Retrieves the 9 specifiable values in the 3x3 affine transformation matrix into a 2-dimensional array of double precision values. The values are stored into the 2-dimensional array using the row index as the first subscript and the column index as the second.
Parameters:
  matrix - The 2-dimensional double array to store thereturned values. The array is assumed to be at least 3x3.
throws:
  ArrayIndexOutOfBoundsException - if matrix is too small



getQuadToQuad
public static PerspectiveTransform getQuadToQuad(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, double x0p, double y0p, double x1p, double y1p, double x2p, double y2p, double x3p, double y3p)(Code)
Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto another arbitrary quadrilateral.
 (x0, y0) -> (x0p, y0p)
 (x1, y1) -> (x1p, y1p)
 (x2, y2) -> (x2p, y2p)
 (x3, y3) -> (x3p, y3p)
 



getQuadToQuad
public static PerspectiveTransform getQuadToQuad(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float x0p, float y0p, float x1p, float y1p, float x2p, float y2p, float x3p, float y3p)(Code)
Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto another arbitrary quadrilateral.
 (x0, y0) -> (x0p, y0p)
 (x1, y1) -> (x1p, y1p)
 (x2, y2) -> (x2p, y2p)
 (x3, y3) -> (x3p, y3p)
 



getQuadToSquare
public static PerspectiveTransform getQuadToSquare(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)(Code)
Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto the unit square.
 (x0, y0) -> (0, 0)
 (x1, y1) -> (1, 0)
 (x2, y2) -> (1, 1)
 (x3, y3) -> (0, 1)
 



getQuadToSquare
public static PerspectiveTransform getQuadToSquare(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)(Code)
Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto the unit square.
 (x0, y0) -> (0, 0)
 (x1, y1) -> (1, 0)
 (x2, y2) -> (1, 1)
 (x3, y3) -> (0, 1)
 



getSquareToQuad
public static PerspectiveTransform getSquareToQuad(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)(Code)
Creates a PerspectiveTransform that maps the unit square onto an arbitrary quadrilateral.
 (0, 0) -> (x0, y0)
 (1, 0) -> (x1, y1)
 (1, 1) -> (x2, y2)
 (0, 1) -> (x3, y3)
 



getSquareToQuad
public static PerspectiveTransform getSquareToQuad(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)(Code)
Creates a PerspectiveTransform that maps the unit square onto an arbitrary quadrilateral.
 (0, 0) -> (x0, y0)
 (1, 0) -> (x1, y1)
 (1, 1) -> (x2, y2)
 (0, 1) -> (x3, y3)
 



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 will be allocated before storing. In either case, ptDst containing the transformed point is returned for convenience. Note that ptSrc and ptDst can the same. In this case, the input point will be overwritten with the transformed point.
Parameters:
  ptSrc - The point to be inverse transformed.
Parameters:
  ptDst - The resulting transformed point.
throws:
  NoninvertibleTransformException - if the matrix cannot beinverted.
throws:
  IllegalArgumentException - if ptSrc is null



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.
Parameters:
  srcPts - The array containing the source point coordinates.Each point is stored as a pair of x,y coordinates.
Parameters:
  dstPts - The array where the transformed point coordinates arereturned. 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 where the first transformedpoint is stored in the destination array.
Parameters:
  numPts - The number of point objects to be transformed.
throws:
  NoninvertibleTransformException - if the matrix cannot beinverted.
throws:
  IllegalArgumentException - if srcPts is null
throws:
  ArrayIndexOutOfBoundsException - if srcPts is too small
throws:
  NoninvertibleTransformException - transform cannot be inverted



isIdentity
public boolean isIdentity()(Code)
Returns the boolean true value if this PerspectiveTransform is an identity transform. Returns false otherwise.



preConcatenate
public void preConcatenate(AffineTransform Tx)(Code)
Pre-concatenates a given AffineTransform to this transform.
throws:
  IllegalArgumentException - if Tx is null



preConcatenate
public void preConcatenate(PerspectiveTransform Tx)(Code)
Pre-concatenates a given PerspectiveTransform to this transform.
throws:
  IllegalArgumentException - if Tx is null



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 PerspectiveTransform 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 translated rotation transformation. This is equivalent to the following sequence of calls:
 translate(x, y);
 rotate(theta);
 translate(-x, -y);
 
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.
Parameters:
  x - The X coordinate of the origin of the rotation
Parameters:
  y - The Y coordinate of the origin of the rotation



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 PerspectiveTransform represented by the following matrix:
 [   sx   0    0   ]
 [   0    sy   0   ]
 [   0    0    1   ]
 

Parameters:
  sx - The X axis scale factor.
Parameters:
  sy - The Y axis scale factor.



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 rotation transformation about a specified point (x, y). This is equivalent to the following sequence of calls:
 setToTranslate(x, y);
 rotate(theta);
 translate(-x, -y);
 
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.
Parameters:
  x - The X coordinate of the origin of the rotation
Parameters:
  y - The Y coordinate of the origin of the rotation



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

Parameters:
  sx - The X axis scale factor.
Parameters:
  sy - The Y axis scale factor.



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

Parameters:
  shx - The factor by which coordinates are shifted towardsthe positive X axis direction according to their Ycoordinate.
Parameters:
  shy - The factor by which coordinates are shifted towardsthe positive Y axis direction according to their Xcoordinate.



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 given AffineTransform.
throws:
  IllegalArgumentException - if Tx is null



setTransform
public void setTransform(PerspectiveTransform Tx)(Code)
Sets this transform to a given PerspectiveTransform.
throws:
  IllegalArgumentException - if Tx is null



setTransform
public void setTransform(float m00, float m10, float m20, float m01, float m11, float m21, float m02, float m12, float m22)(Code)
Sets this transform to a given PerspectiveTransform, expressed by the elements of its matrix. Important Note: The matrix elements in the argument list are in column-major order unlike those of the constructor, which are in row-major order.



setTransform
public void setTransform(double[][] matrix)(Code)
Sets this transform using a two-dimensional array of double precision values. The row index is first, and the column index is second.
Parameters:
  matrix - The 2D double array to be used for setting this transform.The array is assumed to be at least 3x3.
throws:
  IllegalArgumentException - if matrix is null
throws:
  ArrayIndexOutOfBoundsException - if matrix is too small
since:
   JAI 1.1



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 PerspectiveTransform represented by the following matrix:
 [   1   shx   0   ]
 [  shy   1    0   ]
 [   0    0    1   ]
 

Parameters:
  shx - The factor by which coordinates are shifted towardsthe positive X axis direction according to their Ycoordinate.
Parameters:
  shy - The factor by which coordinates are shifted towardsthe positive Y axis direction according to their Xcoordinate.



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



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 will be allocated before storing. In either case, ptDst containing the transformed point is returned for convenience. Note that ptSrc and ptDst can the same. In this case, the input point will be overwritten with the transformed point.
Parameters:
  ptSrc - The array containing the source point objects.
Parameters:
  ptDst - The array where the transform point objects are returned.
throws:
  IllegalArgumentException - if ptSrc is null



transform
public void transform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts)(Code)
Transforms an array of point objects by this transform.
Parameters:
  ptSrc - The array containing the source point objects.
Parameters:
  ptDst - The array where the transform point objects are returned.
Parameters:
  srcOff - The offset to the first point object to be transformedin the source array.
Parameters:
  dstOff - The offset to the location where the first transformedpoint object is stored in the destination array.
Parameters:
  numPts - The number of point objects to be transformed.
throws:
  IllegalArgumentException - if ptSrc is null
throws:
  IllegalArgumentException - if ptDst is null
throws:
  ArrayIndexOutOfBoundsException - if ptSrc is too small



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.
Parameters:
  srcPts - The array containing the source point coordinates.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:
  dstPts - The array where the transformed point coordinates arereturned. Each point is stored as a pair of x,y coordinates.
Parameters:
  dstOff - The offset to the location where the first transformedpoint is stored in the destination array.
Parameters:
  numPts - The number of points to be transformed.
throws:
  IllegalArgumentException - if srcPts is null
throws:
  ArrayIndexOutOfBoundsException - if srcPts is too small



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.
Parameters:
  srcPts - The array containing the source point coordinates.Each point is stored as a pair of x,y coordinates.
Parameters:
  dstPts - The array where the transformed point coordinates arereturned. 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 where the first transformedpoint is stored in the destination array.
Parameters:
  numPts - The number of point objects to be transformed.
throws:
  IllegalArgumentException - if srcPts is null
throws:
  ArrayIndexOutOfBoundsException - if srcPts is too small



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, storing the results into an array of doubles.
Parameters:
  srcPts - The array containing the source point coordinates.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:
  dstPts - The array where the transformed point coordinates arereturned. Each point is stored as a pair of x,y coordinates.
Parameters:
  dstOff - The offset to the location where the first transformedpoint is stored in the destination array.
Parameters:
  numPts - The number of points to be transformed.
throws:
  IllegalArgumentException - if srcPts is null
throws:
  ArrayIndexOutOfBoundsException - if srcPts is too small



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, storing the results into an array of floats.
Parameters:
  srcPts - The array containing the source point coordinates.Each point is stored as a pair of x,y coordinates.
Parameters:
  dstPts - The array where the transformed point coordinates arereturned. 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 where the first transformedpoint is stored in the destination array.
Parameters:
  numPts - The number of point objects to be transformed.
throws:
  IllegalArgumentException - if srcPts is null
throws:
  ArrayIndexOutOfBoundsException - if srcPts is too small



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 PerspectiveTransform represented by the following matrix:
 [   1    0    tx  ]
 [   0    1    ty  ]
 [   0    0    1   ]
 



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.