org.opensourcephysics.media.core
Class PerspectiveTransform

java.lang.Object
  extended by org.opensourcephysics.media.core.PerspectiveTransform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class PerspectiveTransform
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

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
 

See Also:
Serialized Form

Constructor Summary
PerspectiveTransform()
          Constructs an identity PerspectiveTransform.
PerspectiveTransform(java.awt.geom.AffineTransform transform)
          Constructs a new PerspectiveTransform with the same effect as an existing AffineTransform.
PerspectiveTransform(double[][] matrix)
          Constructs a new PerspectiveTransform from a two-dimensional array of doubles.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this PerspectiveTransform object.
 void concatenate(java.awt.geom.AffineTransform Tx)
          Post-concatenates a given AffineTransform to this transform.
 void concatenate(PerspectiveTransform Tx)
          Post-concatenates a given PerspectiveTransform to this transform.
 PerspectiveTransform createAdjoint()
          Returns a new PerpectiveTransform that is the adjoint, of the current transform.
 PerspectiveTransform createInverse()
          Returns a new PerpectiveTransform that is the inverse of the current transform.
 boolean equals(java.lang.Object obj)
          Tests if this PerspectiveTransform equals a supplied one.
 double getDeterminant()
          Returns the determinant of the matrix representation of the transform.
 double[] getMatrix(double[] flatmatrix)
          Deprecated. as of JAI 1.1 Use double[][] getMatrix(double[][] matrix) instead.
 double[][] getMatrix(double[][] matrix)
          Retrieves the 9 specifiable values in the 3x3 affine transformation matrix into a 2-dimensional array of double precision values.
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)
          Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto another arbitrary quadrilateral.
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)
          Creates a PerspectiveTransform that maps an arbitrary quadrilateral onto another arbitrary quadrilateral.
static PerspectiveTransform getQuadToSquare(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.
static PerspectiveTransform getQuadToSquare(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.
static PerspectiveTransform getSquareToQuad(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.
static PerspectiveTransform getSquareToQuad(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.
 void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
          Inverse transforms an array of double precision coordinates by this transform.
 java.awt.geom.Point2D inverseTransform(java.awt.geom.Point2D ptSrc, java.awt.geom.Point2D ptDst)
          Inverse transforms the specified ptSrc and stores the result in ptDst.
 boolean isIdentity()
          Returns the boolean true value if this PerspectiveTransform is an identity transform.
 void preConcatenate(java.awt.geom.AffineTransform Tx)
          Pre-concatenates a given AffineTransform to this transform.
 void preConcatenate(PerspectiveTransform Tx)
          Pre-concatenates a given PerspectiveTransform to this transform.
 void rotate(double theta)
          Concatenates this transform with a rotation transformation.
 void rotate(double theta, double x, double y)
          Concatenates this transform with a translated rotation transformation.
 void scale(double sx, double sy)
          Concatenates this transform with a scaling transformation.
 void setToIdentity()
          Resets this transform to the Identity transform.
 void setToRotation(double theta)
          Sets this transform to a rotation transformation.
 void setToRotation(double theta, double x, double y)
          Sets this transform to a rotation transformation about a specified point (x, y).
 void setToScale(double sx, double sy)
          Sets this transform to a scale transformation with scale factors sx and sy.
 void setToShear(double shx, double shy)
          Sets this transform to a shearing transformation with shear factors sx and sy.
 void setToTranslation(double tx, double ty)
          Sets this transform to a translation transformation.
 void setTransform(java.awt.geom.AffineTransform Tx)
          Sets this transform to a given AffineTransform.
 void setTransform(double[][] matrix)
          Sets this transform using a two-dimensional array of double precision values.
 void setTransform(PerspectiveTransform Tx)
          Sets this transform to a given PerspectiveTransform.
 void shear(double shx, double shy)
          Concatenates this transform with a shearing transformation.
 java.lang.String toString()
          Returns a String that represents the value of this Object.
 void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
          Transforms an array of double precision coordinates by this transform.
 void transform(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.
 void transform(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.
 void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
          Transforms an array of floating point coordinates by this transform.
 void transform(java.awt.geom.Point2D[] ptSrc, int srcOff, java.awt.geom.Point2D[] ptDst, int dstOff, int numPts)
          Transforms an array of point objects by this transform.
 java.awt.geom.Point2D transform(java.awt.geom.Point2D ptSrc, java.awt.geom.Point2D ptDst)
          Transforms the specified ptSrc and stores the result in ptDst.
 void translate(double tx, double ty)
          Concatenates this transform with a translation transformation.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PerspectiveTransform

public PerspectiveTransform()
Constructs an identity PerspectiveTransform.


PerspectiveTransform

public PerspectiveTransform(double[][] matrix)
Constructs a new PerspectiveTransform from a two-dimensional array of doubles.

Throws:
java.lang.IllegalArgumentException - if matrix is null
java.lang.ArrayIndexOutOfBoundsException - if matrix is too small

PerspectiveTransform

public PerspectiveTransform(java.awt.geom.AffineTransform transform)
Constructs a new PerspectiveTransform with the same effect as an existing AffineTransform.

Throws:
java.lang.IllegalArgumentException - if transform is null
Method Detail

getSquareToQuad

public static PerspectiveTransform getSquareToQuad(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.
 (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)
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)
 


getQuadToSquare

public static PerspectiveTransform getQuadToSquare(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.
 (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)
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)
 


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)
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)
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)
 


getDeterminant

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


getMatrix

public double[] getMatrix(double[] flatmatrix)
Deprecated. as of JAI 1.1 Use double[][] getMatrix(double[][] matrix) instead.

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 returned values. The length of the array is assumed to be at least 9.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if flatmatrix is too small

getMatrix

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. 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 the returned values. The array is assumed to be at least 3x3.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if matrix is too small

translate

public void translate(double tx,
                      double ty)
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   ]
 


rotate

public void rotate(double theta)
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)
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.
x - The X coordinate of the origin of the rotation
y - The Y coordinate of the origin of the rotation

scale

public void scale(double sx,
                  double sy)
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.
sy - The Y axis scale factor.

shear

public void shear(double shx,
                  double shy)
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 towards the positive X axis direction according to their Y coordinate.
shy - The factor by which coordinates are shifted towards the positive Y axis direction according to their X coordinate.

setToIdentity

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


setToTranslation

public void setToTranslation(double tx,
                             double ty)
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 the X axis direction
ty - The distance by which coordinates are translated in the Y axis direction

setToRotation

public void setToRotation(double theta)
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)
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.
x - The X coordinate of the origin of the rotation
y - The Y coordinate of the origin of the rotation

setToScale

public void setToScale(double sx,
                       double sy)
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.
sy - The Y axis scale factor.

setToShear

public void setToShear(double shx,
                       double shy)
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 towards the positive X axis direction according to their Y coordinate.
shy - The factor by which coordinates are shifted towards the positive Y axis direction according to their X coordinate.

setTransform

public void setTransform(java.awt.geom.AffineTransform Tx)
Sets this transform to a given AffineTransform.

Throws:
java.lang.IllegalArgumentException - if Tx is null

setTransform

public void setTransform(PerspectiveTransform Tx)
Sets this transform to a given PerspectiveTransform.

Throws:
java.lang.IllegalArgumentException - if Tx is null

setTransform

public void setTransform(double[][] matrix)
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:
java.lang.IllegalArgumentException - if matrix is null
java.lang.ArrayIndexOutOfBoundsException - if matrix is too small
Since:
JAI 1.1

concatenate

public void concatenate(java.awt.geom.AffineTransform Tx)
Post-concatenates a given AffineTransform to this transform.

Throws:
java.lang.IllegalArgumentException - if Tx is null

concatenate

public void concatenate(PerspectiveTransform Tx)
Post-concatenates a given PerspectiveTransform to this transform.

Throws:
java.lang.IllegalArgumentException - if Tx is null

preConcatenate

public void preConcatenate(java.awt.geom.AffineTransform Tx)
Pre-concatenates a given AffineTransform to this transform.

Throws:
java.lang.IllegalArgumentException - if Tx is null

preConcatenate

public void preConcatenate(PerspectiveTransform Tx)
Pre-concatenates a given PerspectiveTransform to this transform.

Throws:
java.lang.IllegalArgumentException - if Tx is null

createInverse

public PerspectiveTransform createInverse()
                                   throws java.awt.geom.NoninvertibleTransformException
Returns a new PerpectiveTransform that is the inverse of the current transform.

Throws:
java.awt.geom.NoninvertibleTransformException - if transform cannot be inverted

createAdjoint

public PerspectiveTransform createAdjoint()
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.


transform

public java.awt.geom.Point2D transform(java.awt.geom.Point2D ptSrc,
                                       java.awt.geom.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. 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.
ptDst - The array where the transform point objects are returned.
Throws:
java.lang.IllegalArgumentException - if ptSrc is null

transform

public void transform(java.awt.geom.Point2D[] ptSrc,
                      int srcOff,
                      java.awt.geom.Point2D[] ptDst,
                      int dstOff,
                      int numPts)
Transforms an array of point objects by this transform.

Parameters:
ptSrc - The array containing the source point objects.
ptDst - The array where the transform point objects are returned.
srcOff - The offset to the first point object to be transformed in the source array.
dstOff - The offset to the location where the first transformed point object is stored in the destination array.
numPts - The number of point objects to be transformed.
Throws:
java.lang.IllegalArgumentException - if ptSrc is null
java.lang.IllegalArgumentException - if ptDst is null
java.lang.ArrayIndexOutOfBoundsException - if ptSrc is too small

transform

public void transform(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.
srcOff - The offset to the first point to be transformed in the source array.
dstPts - The array where the transformed point coordinates are returned. Each point is stored as a pair of x,y coordinates.
dstOff - The offset to the location where the first transformed point is stored in the destination array.
numPts - The number of points to be transformed.
Throws:
java.lang.IllegalArgumentException - if srcPts is null
java.lang.ArrayIndexOutOfBoundsException - if srcPts is too small

transform

public void transform(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.
dstPts - The array where the transformed point coordinates are returned. Each point is stored as a pair of x,y coordinates.
srcOff - The offset to the first point to be transformed in the source array.
dstOff - The offset to the location where the first transformed point is stored in the destination array.
numPts - The number of point objects to be transformed.
Throws:
java.lang.IllegalArgumentException - if srcPts is null
java.lang.ArrayIndexOutOfBoundsException - if srcPts is too small

transform

public void transform(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.
srcOff - The offset to the first point to be transformed in the source array.
dstPts - The array where the transformed point coordinates are returned. Each point is stored as a pair of x,y coordinates.
dstOff - The offset to the location where the first transformed point is stored in the destination array.
numPts - The number of points to be transformed.
Throws:
java.lang.IllegalArgumentException - if srcPts is null
java.lang.ArrayIndexOutOfBoundsException - if srcPts is too small

transform

public void transform(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.
dstPts - The array where the transformed point coordinates are returned. Each point is stored as a pair of x,y coordinates.
srcOff - The offset to the first point to be transformed in the source array.
dstOff - The offset to the location where the first transformed point is stored in the destination array.
numPts - The number of point objects to be transformed.
Throws:
java.lang.IllegalArgumentException - if srcPts is null
java.lang.ArrayIndexOutOfBoundsException - if srcPts is too small

inverseTransform

public java.awt.geom.Point2D inverseTransform(java.awt.geom.Point2D ptSrc,
                                              java.awt.geom.Point2D ptDst)
                                       throws java.awt.geom.NoninvertibleTransformException
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.
ptDst - The resulting transformed point.
Throws:
java.awt.geom.NoninvertibleTransformException - if the matrix cannot be inverted.
java.lang.IllegalArgumentException - if ptSrc is null

inverseTransform

public void inverseTransform(double[] srcPts,
                             int srcOff,
                             double[] dstPts,
                             int dstOff,
                             int numPts)
                      throws java.awt.geom.NoninvertibleTransformException
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.
dstPts - The array where the transformed point coordinates are returned. Each point is stored as a pair of x,y coordinates.
srcOff - The offset to the first point to be transformed in the source array.
dstOff - The offset to the location where the first transformed point is stored in the destination array.
numPts - The number of point objects to be transformed.
Throws:
java.awt.geom.NoninvertibleTransformException - if the matrix cannot be inverted.
java.lang.IllegalArgumentException - if srcPts is null
java.lang.ArrayIndexOutOfBoundsException - if srcPts is too small
java.awt.geom.NoninvertibleTransformException - transform cannot be inverted

toString

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

Overrides:
toString in class java.lang.Object

isIdentity

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


clone

public java.lang.Object clone()
Returns a copy of this PerspectiveTransform object.

Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Tests if this PerspectiveTransform equals a supplied one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The PerspectiveTransform to be compared to this one.