| 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
|
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 Object | clone() Returns a copy of this PerspectiveTransform object. | public void | concatenate(AffineTransform Tx) Post-concatenates a given AffineTransform to this transform. | public void | concatenate(PerspectiveTransform Tx) Post-concatenates a given PerspectiveTransform to this transform. | public PerspectiveTransform | createAdjoint() Returns a new PerpectiveTransform that is the adjoint,
of the current transform. | public PerspectiveTransform | createInverse() Returns a new PerpectiveTransform that is the inverse
of the current transform. | public boolean | equals(Object obj) Tests if this PerspectiveTransform equals a supplied one. | public double | getDeterminant() 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 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. | 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. | 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. | 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. | 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. | 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. | public Point2D | inverseTransform(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 void | inverseTransform(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 boolean | isIdentity() Returns the boolean true value if this PerspectiveTransform is an
identity transform. | public void | preConcatenate(AffineTransform Tx) Pre-concatenates a given AffineTransform to this transform. | public void | preConcatenate(PerspectiveTransform Tx) Pre-concatenates a given PerspectiveTransform to this transform. | public void | rotate(double theta) Concatenates this transform with a rotation transformation. | public void | rotate(double theta, double x, double y) Concatenates this transform with a translated rotation transformation. | public void | scale(double sx, double sy) Concatenates this transform with a scaling transformation. | public void | setToIdentity() Resets this transform to the Identity transform. | public void | setToRotation(double theta) Sets this transform to a rotation transformation. | public void | setToRotation(double theta, double x, double y) Sets this transform to a rotation transformation
about a specified point (x, y). | public void | setToScale(double sx, double sy) Sets this transform to a scale transformation
with scale factors sx and sy. | public void | setToShear(double shx, double shy) Sets this transform to a shearing transformation
with shear factors sx and sy. | public void | setToTranslation(double tx, double ty) Sets this transform to a translation transformation. | public void | setTransform(AffineTransform Tx) Sets this transform to a given AffineTransform. | public void | setTransform(PerspectiveTransform Tx) Sets this transform to a given PerspectiveTransform. | public void | setTransform(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 void | setTransform(double[][] matrix) Sets this transform using a two-dimensional array of double precision
values. | public void | shear(double shx, double shy) Concatenates this transform with a shearing transformation. | public String | toString() Returns a String that represents the value of this Object. | public Point2D | transform(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 void | transform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts) Transforms an array of point objects by this 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. 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 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. Parameters: dstPts - The array where the transformed point coordinates arereturned. | 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. 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 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. Parameters: dstPts - The array where the transformed point coordinates arereturned. | public void | translate(double tx, double ty) Concatenates this transform with a translation transformation. |
m00m01m02m10m11m12m20m21m22 | double m00m01m02m10m11m12m20m21m22(Code) | | An element of the transform matrix.
|
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(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(AffineTransform transform)(Code) | | Constructs a new PerspectiveTransform with the same effect
as an existing AffineTransform.
throws: IllegalArgumentException - if transform is null |
clone | public Object clone()(Code) | | Returns a copy of this PerspectiveTransform object.
|
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.
|
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.
|
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(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 ]
|
|
|