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

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

	[ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
	[ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
	[ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
 
@version
1.71, 12/19/03
@author
Jim Graham
Constructs a new AffineTransform representing the Identity transformation.
Constructs a new AffineTransform that is a copy of the specified AffineTransform object.
Parameters
Txthe AffineTransform object to copy
Constructs a new AffineTransform from 6 floating point values representing the 6 specifiable entries of the 3x3 transformation matrix.
Parameters
m00, m01, m02, m10, m11, m12the 6 floating point values that compose the 3x3 transformation matrix
Constructs a new AffineTransform from an array of floating point values representing either the 4 non-translation enries or the 6 specifiable entries of the 3x3 transformation matrix. The values are retrieved from the array as { m00 m10 m01 m11 [m02 m12]}.
Parameters
flatmatrixthe float array containing the values to be set in the new AffineTransform object. The length of the array is assumed to be at least 4. If the length of the array is less than 6, only the first 4 values are taken. If the length of the array is greater than 6, the first 6 values are taken.
Constructs a new AffineTransform from 6 double precision values representing the 6 specifiable entries of the 3x3 transformation matrix.
Parameters
m00, m01, m02, m10, m11, m12the 6 floating point values that compose the 3x3 transformation matrix
Constructs a new AffineTransform from an array of double precision values representing either the 4 non-translation entries or the 6 specifiable entries of the 3x3 transformation matrix. The values are retrieved from the array as { m00 m10 m01 m11 [m02 m12]}.
Parameters
flatmatrixthe double array containing the values to be set in the new AffineTransform object. The length of the array is assumed to be at least 4. If the length of the array is less than 6, only the first 4 values are taken. If the length of the array is greater than 6, the first 6 values are taken.
This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits. A right handed coordinate system is one where the positive X axis rotates counterclockwise to overlay the positive Y axis similar to the direction that the fingers on your right hand curl when you stare end on at your thumb. A left handed coordinate system is one where the positive X axis rotates clockwise to overlay the positive Y axis similar to the direction that the fingers on your left hand curl. There is no mathematical way to determine the angle of the original flipping or mirroring transformation since all angles of flip are identical given an appropriate adjusting rotation.
This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TYPE_QUADRANT_ROTATION flag.
This flag bit indicates that the transform defined by this object performs a general scale in addition to the conversions indicated by other flag bits. A general scale multiplies the length of vectors by different amounts in the x and y directions without changing the angle between perpendicular vectors. This flag bit is mutually exclusive with the TYPE_UNIFORM_SCALE flag.
This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates. If this transform can be classified by any of the above constants, the type will either be the constant TYPE_IDENTITY or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
This constant indicates that the transform defined by this object is an identity transform. An identity transform is one in which the output coordinates are always the same as the input coordinates. If this transform is anything other than the identity transform, the type will either be the constant GENERAL_TRANSFORM or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
This constant is a bit mask for any of the rotation flag bits.
This constant is a bit mask for any of the scale flag bits.
This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TYPE_GENERAL_ROTATION flag.
This flag bit indicates that the transform defined by this object performs a translation in addition to the conversions indicated by other flag bits. A translation moves the coordinates by a constant amount in x and y without changing the length or angle of vectors.
This flag bit indicates that the transform defined by this object performs a uniform scale in addition to the conversions indicated by other flag bits. A uniform scale multiplies the length of vectors by the same amount in both the x and y directions without changing the angle between vectors. This flag bit is mutually exclusive with the TYPE_GENERAL_SCALE flag.
Returns a copy of this AffineTransform object.
Return
an Object that is a copy of this AffineTransform object.
Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx. Cx is updated to perform the combined transformation. Transforming a point p by the updated transform Cx' is equivalent to first transforming p by Tx and then transforming the result by the original transform Cx like this: Cx'(p) = Cx(Tx(p)) In matrix notation, if this transform Cx is represented by the matrix [this] and Tx is represented by the matrix [Tx] then this method does the following:
		[this] = [this] x [Tx]
 
Parameters
Txthe AffineTransform object to be concatenated with this AffineTransform object.
Returns an AffineTransform object representing the inverse transformation. The inverse transform Tx' of this transform Tx maps coordinates transformed by Tx back to their original coordinates. In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)).

If this transform maps all coordinates onto a point or a line then it will not have an inverse, since coordinates that do not lie on the destination point or line will not have an inverse mapping. The getDeterminant method can be used to determine if this transform has no inverse, in which case an exception will be thrown if the createInverse method is called.

Return
a new AffineTransform object representing the inverse transformation.
Throws
NoninvertibleTransformException if the matrix cannot be inverted.
Returns a new Shape object defined by the geometry of the specified Shape after it has been transformed by this transform.
Parameters
pSrcthe specified Shape object to be transformed by this transform.
Return
a new Shape object that defines the geometry of the transformed Shape.
Transforms an array of relative distance vectors by this transform. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
	[  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
	[  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
	[ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
 
The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters
srcPtsthe array containing the source distance vectors. Each vector is stored as a pair of relative x, y coordinates.
dstPtsthe array into which the transformed distance vectors are returned. Each vector is stored as a pair of relative x, y coordinates.
srcOffthe offset to the first vector to be transformed in the source array
dstOffthe offset to the location of the first transformed vector that is stored in the destination array
numPtsthe number of vector coordinate pairs to be transformed
Transforms the relative distance vector specified by ptSrc and stores the result in ptDst. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
	[  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
	[  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
	[ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
 
If ptDst is null, a new Point2D object is allocated and then the result of the transform is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters
ptSrcthe distance vector to be delta transformed
ptDstthe resulting transformed distance vector
Return
ptDst, which contains the result of the transformation.
Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.
Parameters
objthe Object to test for equality with this AffineTransform
Return
true if obj equals this AffineTransform object; false otherwise.
Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class.
Return
The java.lang.Class object that represents the runtime class of the object. The result is of type {@code Class} where X is the erasure of the static type of the expression on which getClass is called.
Returns the determinant of the matrix representation of the transform. The determinant is useful both to determine if the transform can be inverted and to get a single value representing the combined X and Y scaling of the transform.

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

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

Mathematically, the determinant is calculated using the formula:

		|  m00  m01  m02  |
		|  m10  m11  m12  |  =  m00 * m11 - m01 * m10
		|   0    0    1   |
 
Return
the determinant of the matrix used to transform the coordinates.
Retrieves the 6 specifiable values in the 3x3 affine transformation matrix and places them into an array of double precisions values. The values are stored in the array as { m00 m10 m01 m11 m02 m12 }. An array of 4 doubles can also be specified, in which case only the first four elements representing the non-transform parts of the array are retrieved and the values are stored into the array as { m00 m10 m01 m11 }
Parameters
flatmatrixthe double array used to store the returned values.
Returns a transform representing a rotation transformation. The matrix representing the returned transform is:
		[   cos(theta)    -sin(theta)    0   ]
		[   sin(theta)     cos(theta)    0   ]
		[       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters
thetathe angle of rotation in radians
Return
an AffineTransform object that is a rotation transformation, created with the specified angle of rotation.
Returns a transform that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

	    AffineTransform Tx = new AffineTransform();
	    Tx.setToTranslation(x, y);	// S3: final translation
	    Tx.rotate(theta);		// S2: rotate around anchor
	    Tx.translate(-x, -y);	// S1: translate anchor to origin
 
The matrix representing the returned transform is:
		[   cos(theta)    -sin(theta)    x-x*cos+y*sin  ]
		[   sin(theta)     cos(theta)    y-x*sin-y*cos  ]
		[       0              0               1        ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters
thetathe angle of rotation in radians
x, ythe coordinates of the anchor point of the rotation
Return
an AffineTransform object that rotates coordinates around the specified point by the specified angle of rotation.
Returns a transform representing a scaling transformation. The matrix representing the returned transform is:
		[   sx   0    0   ]
		[   0    sy   0   ]
		[   0    0    1   ]
 
Parameters
sxthe factor by which coordinates are scaled along the X axis direction
sythe factor by which coordinates are scaled along the Y axis direction
Return
an AffineTransform object that scales coordinates by the specified factors.
Returns the X coordinate scaling element (m00) of the 3x3 affine transformation matrix.
Return
a double value that is the X coordinate of the scaling element of the affine transformation matrix.
See Also
Returns the Y coordinate scaling element (m11) of the 3x3 affine transformation matrix.
Return
a double value that is the Y coordinate of the scaling element of the affine transformation matrix.
See Also
Returns a transform representing a shearing transformation. The matrix representing the returned transform is:
		[   1   shx   0   ]
		[  shy   1    0   ]
		[   0    0    1   ]
 
Parameters
shxthe multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate
shythe multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate
Return
an AffineTransform object that shears coordinates by the specified multipliers.
Returns the X coordinate shearing element (m01) of the 3x3 affine transformation matrix.
Return
a double value that is the X coordinate of the shearing element of the affine transformation matrix.
See Also
Returns the Y coordinate shearing element (m10) of the 3x3 affine transformation matrix.
Return
a double value that is the Y coordinate of the shearing element of the affine transformation matrix.
See Also
Returns a transform representing a translation transformation. The matrix representing the returned transform is:
		[   1    0    tx  ]
		[   0    1    ty  ]
		[   0    0    1   ]
 
Parameters
txthe distance by which coordinates are translated in the X axis direction
tythe distance by which coordinates are translated in the Y axis direction
Return
an AffineTransform object that represents a translation transformation, created with the specified vector.
Returns the X coordinate of the translation element (m02) of the 3x3 affine transformation matrix.
Return
a double value that is the X coordinate of the translation element of the affine transformation matrix.
See Also
Returns the Y coordinate of the translation element (m12) of the 3x3 affine transformation matrix.
Return
a double value that is the Y coordinate of the translation element of the affine transformation matrix.
See Also
Retrieves the flag bits describing the conversion properties of this transform. The return value is either one of the constants TYPE_IDENTITY or TYPE_GENERAL_TRANSFORM, or a combination of the appriopriate flag bits. A valid combination of flag bits is an exclusive OR operation that can combine the TYPE_TRANSLATION flag bit in addition to either of the TYPE_UNIFORM_SCALE or TYPE_GENERAL_SCALE flag bits as well as either of the TYPE_QUADRANT_ROTATION or TYPE_GENERAL_ROTATION flag bits.
Return
the OR combination of any of the indicated flags that apply to this transform
Returns the hashcode for this transform.
Return
a hash code for this transform.
Inverse transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters
srcPtsthe array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPtsthe array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOffthe offset to the first point to be transformed in the source array
dstOffthe offset to the location of the first transformed point that is stored in the destination array
numPtsthe number of point objects to be transformed
Throws
NoninvertibleTransformExceptionif the matrix cannot be inverted.
Inverse transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object is allocated and then the result of the transform is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters
ptSrcthe point to be inverse transformed
ptDstthe resulting transformed point
Return
ptDst, which contains the result of the inverse transform.
Throws
NoninvertibleTransformExceptionif the matrix cannot be inverted.
Returns true if this AffineTransform is an identity transform.
Return
true if this AffineTransform is an identity transform; false otherwise.
Wakes up a single thread that is waiting on this object's monitor. If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods.

The awakened thread will not be able to proceed until the current thread relinquishes the lock on this object. The awakened thread will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened thread enjoys no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways:

  • By executing a synchronized instance method of that object.
  • By executing the body of a synchronized statement that synchronizes on the object.
  • For objects of type Class, by executing a synchronized static method of that class.

Only one thread at a time can own an object's monitor.

Throws
IllegalMonitorStateExceptionif the current thread is not the owner of this object's monitor.
Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods.

The awakened threads will not be able to proceed until the current thread relinquishes the lock on this object. The awakened threads will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened threads enjoy no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Throws
IllegalMonitorStateExceptionif the current thread is not the owner of this object's monitor.
Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space. Cx is updated to perform the combined transformation. Transforming a point p by the updated transform Cx' is equivalent to first transforming p by the original transform Cx and then transforming the result by Tx like this: Cx'(p) = Tx(Cx(p)) In matrix notation, if this transform Cx is represented by the matrix [this] and Tx is represented by the matrix [Tx] then this method does the following:
		[this] = [Tx] x [this]
 
Parameters
Txthe AffineTransform object to be concatenated with this AffineTransform object.
See Also
Concatenates this transform with a rotation transformation. This is equivalent to calling concatenate(R), where R is an AffineTransform represented by the following matrix:
		[   cos(theta)    -sin(theta)    0   ]
		[   sin(theta)     cos(theta)    0   ]
		[       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters
thetathe angle of rotation in radians
Concatenates this transform with a transform that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

		translate(x, y);	// S3: final translation
		rotate(theta);		// S2: rotate around anchor
		translate(-x, -y);	// S1: translate anchor to origin
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters
thetathe angle of rotation in radians
x, ythe coordinates of the anchor point of the rotation
Concatenates this transform with a scaling transformation. This is equivalent to calling concatenate(S), where S is an AffineTransform represented by the following matrix:
		[   sx   0    0   ]
		[   0    sy   0   ]
		[   0    0    1   ]
 
Parameters
sxthe factor by which coordinates are scaled along the X axis direction
sythe factor by which coordinates are scaled along the Y axis direction
Resets this transform to the Identity transform.
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
thetathe angle of rotation in radians
Sets this transform to a translated rotation transformation. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

	    setToTranslation(x, y);	// S3: final translation
	    rotate(theta);		// S2: rotate around anchor
	    translate(-x, -y);		// S1: translate anchor to origin
 
The matrix representing this transform becomes:
		[   cos(theta)    -sin(theta)    x-x*cos+y*sin  ]
		[   sin(theta)     cos(theta)    y-x*sin-y*cos  ]
		[       0              0               1        ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters
thetathe angle of rotation in radians
x, ythe coordinates of the anchor point of the rotation
Sets this transform to a scaling transformation. The matrix representing this transform becomes:
		[   sx   0    0   ]
		[   0    sy   0   ]
		[   0    0    1   ]
 
Parameters
sxthe factor by which coordinates are scaled along the X axis direction
sythe factor by which coordinates are scaled along the Y axis direction
Sets this transform to a shearing transformation. The matrix representing this transform becomes:
		[   1   shx   0   ]
		[  shy   1    0   ]
		[   0    0    1   ]
 
Parameters
shxthe multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate
shythe multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate
Sets this transform to a translation transformation. The matrix representing this transform becomes:
		[   1    0    tx  ]
		[   0    1    ty  ]
		[   0    0    1   ]
 
Parameters
txthe distance by which coordinates are translated in the X axis direction
tythe distance by which coordinates are translated in the Y axis direction
Sets this transform to a copy of the transform in the specified AffineTransform object.
Parameters
Txthe AffineTransform object from which to copy the transform
Sets this transform to the matrix specified by the 6 double precision values.
Parameters
m00, m01, m02, m10, m11, m12the 6 floating point values that compose the 3x3 transformation matrix
Concatenates this transform with a shearing transformation. This is equivalent to calling concatenate(SH), where SH is an AffineTransform represented by the following matrix:
		[   1   shx   0   ]
		[  shy   1    0   ]
		[   0    0    1   ]
 
Parameters
shxthe multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate
shythe multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate
Returns a String that represents the value of this Object .
Return
a String representing the value of this Object.
Transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters
srcPtsthe array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPtsthe array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOffthe offset to the first point to be transformed in the source array
dstOffthe offset to the location of the first transformed point that is stored in the destination array
numPtsthe number of point objects to be transformed
Transforms an array of double precision coordinates by this transform and stores the results into an array of floats. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters
srcPtsthe array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPtsthe array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOffthe offset to the first point to be transformed in the source array
dstOffthe offset to the location of the first transformed point that is stored in the destination array
numPtsthe number of point objects to be transformed
Transforms an array of floating point coordinates by this transform and stores the results into an array of doubles. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters
srcPtsthe array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPtsthe array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOffthe offset to the first point to be transformed in the source array
dstOffthe offset to the location of the first transformed point that is stored in the destination array
numPtsthe number of points to be transformed
Transforms an array of floating point coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters
srcPtsthe array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPtsthe array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOffthe offset to the first point to be transformed in the source array
dstOffthe offset to the location of the first transformed point that is stored in the destination array
numPtsthe number of points to be transformed
Transforms an array of point objects by this transform. If any element of the ptDst array is null, a new Point2D object is allocated and stored into that element before storing the results of the transformation.

Note that this method does not take any precautions to avoid problems caused by storing results into Point2D objects that will be used as the source for calculations further down the source array. This method does guarantee that if a specified Point2D object is both the source and destination for the same single point transform operation then the results will not be stored until the calculations are complete to avoid storing the results on top of the operands. If, however, the destination Point2D object for one operation is the same object as the source Point2D object for another operation further down the source array then the original coordinates in that point are overwritten before they can be converted.

Parameters
ptSrcthe array containing the source point objects
ptDstthe array into which the transform point objects are returned
srcOffthe offset to the first point object to be transformed in the source array
dstOffthe offset to the location of the first transformed point object that is stored in the destination array
numPtsthe number of point objects to be transformed
Transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object is allocated and then the result of the transformation is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters
ptSrcthe specified Point2D to be transformed
ptDstthe specified Point2D that stores the result of transforming ptSrc
Return
the ptDst after transforming ptSrc and stroring the result in ptDst.
Concatenates this transform with a translation transformation. This is equivalent to calling concatenate(T), where T is an AffineTransform represented by the following matrix:
		[   1    0    tx  ]
		[   0    1    ty  ]
		[   0    0    1   ]
 
Parameters
txthe distance by which coordinates are translated in the X axis direction
tythe distance by which coordinates are translated in the Y axis direction
Causes current thread to wait until another thread invokes the method or the method for this object. In other words, this method behaves exactly as if it simply performs the call wait(0).

The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The thread then waits until it can re-obtain ownership of the monitor and resumes execution.

As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a loop:

     synchronized (obj) {
         while (<condition does not hold>)
             obj.wait();
         ... // Perform action appropriate to condition
     }
 
This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
Throws
IllegalMonitorStateExceptionif the current thread is not the owner of the object's monitor.
InterruptedExceptionif another thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.
Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.

The current thread must own this object's monitor.

This method causes the current thread (call it T) to place itself in the wait set for this object and then to relinquish any and all synchronization claims on this object. Thread T becomes disabled for thread scheduling purposes and lies dormant until one of four things happens:

  • Some other thread invokes the notify method for this object and thread T happens to be arbitrarily chosen as the thread to be awakened.
  • Some other thread invokes the notifyAll method for this object.
  • Some other thread interrupts thread T.
  • The specified amount of real time has elapsed, more or less. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified.
The thread T is then removed from the wait set for this object and re-enabled for thread scheduling. It then competes in the usual manner with other threads for the right to synchronize on the object; once it has gained control of the object, all its synchronization claims on the object are restored to the status quo ante - that is, to the situation as of the time that the wait method was invoked. Thread T then returns from the invocation of the wait method. Thus, on return from the wait method, the synchronization state of the object and of thread T is exactly as it was when the wait method was invoked.

A thread can also wake up without being notified, interrupted, or timing out, a so-called spurious wakeup. While this will rarely occur in practice, applications must guard against it by testing for the condition that should have caused the thread to be awakened, and continuing to wait if the condition is not satisfied. In other words, waits should always occur in loops, like this one:

     synchronized (obj) {
         while (<condition does not hold>)
             obj.wait(timeout);
         ... // Perform action appropriate to condition
     }
 
(For more information on this topic, see Section 3.2.3 in Doug Lea's "Concurrent Programming in Java (Second Edition)" (Addison-Wesley, 2000), or Item 50 in Joshua Bloch's "Effective Java Programming Language Guide" (Addison-Wesley, 2001).

If the current thread is interrupted by another thread while it is waiting, then an InterruptedException is thrown. This exception is not thrown until the lock status of this object has been restored as described above.

Note that the wait method, as it places the current thread into the wait set for this object, unlocks only this object; any other objects on which the current thread may be synchronized remain locked while the thread waits.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Parameters
timeoutthe maximum time to wait in milliseconds.
Throws
IllegalArgumentExceptionif the value of timeout is negative.
IllegalMonitorStateExceptionif the current thread is not the owner of the object's monitor.
InterruptedExceptionif another thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.
Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

This method is similar to the wait method of one argument, but it allows finer control over the amount of time to wait for a notification before giving up. The amount of real time, measured in nanoseconds, is given by:

 1000000*timeout+nanos

In all other respects, this method does the same thing as the method of one argument. In particular, wait(0, 0) means the same thing as wait(0).

The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until either of the following two conditions has occurred:

  • Another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method.
  • The timeout period, specified by timeout milliseconds plus nanos nanoseconds arguments, has elapsed.

The thread then waits until it can re-obtain ownership of the monitor and resumes execution.

As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a loop:

     synchronized (obj) {
         while (<condition does not hold>)
             obj.wait(timeout, nanos);
         ... // Perform action appropriate to condition
     }
 
This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
Parameters
timeoutthe maximum time to wait in milliseconds.
nanosadditional time, in nanoseconds range 0-999999.
Throws
IllegalArgumentExceptionif the value of timeout is negative or the value of nanos is not in the range 0-999999.
IllegalMonitorStateExceptionif the current thread is not the owner of this object's monitor.
InterruptedExceptionif another thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.