|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.gui2.ScreenTransformation | +--gishur.x2.gui.ScreenX2Transformation
Transformation class for planar graphics using the x2-package.
This class can convert XPoint
s and arrays of XPoint
s.
Constructor Summary | |
ScreenX2Transformation()
Default constructor. |
Method Summary | |
java.awt.Point |
deltaTransform(java.lang.Object point)
Transforms a relative distance vector object in user space to a relative distance vector in screen coordinates. |
java.awt.Point[] |
deltaTransform(java.lang.Object[] points,
int off,
int len)
Transforms a subarray of relative distance vector objects in user space to a relative distance vector array in screen coordinates. |
java.lang.Object |
inverseDeltaTransform(java.awt.Point point)
Transforms a relative distance vector in screen coordinates to a relative distance vector object in user space. |
java.lang.Object |
inverseDeltaTransform(java.awt.Point[] points,
int off,
int len)
Transforms a subarray of relative distance vectors in screen coordinates to an array of relative distance vector objects in user space. |
AffineTransformation |
inverseTransform(double m00,
double m01,
double m02,
double m10,
double m11,
double m12)
Transforms the given transformation matrix for an affine transformation in screen coordinates to a transformation matrix in user space that does the same transformation with the original object. |
java.lang.Object |
inverseTransform(int x,
int y)
Transforms one point on the screen to a point object in user space. |
java.lang.Object[] |
inverseTransform(java.awt.Point[] points,
int off,
int len)
Transforms a subarray of points in screen coordinates to an array of point objects in user space. |
void |
resetTransform()
Resets the ScreenTransformation to its initial values (identity). |
void |
restoreStatus(java.lang.Object status)
Restores a state saved via saveStatus() . |
java.lang.Object |
saveStatus()
Returns the status of the ScreenTransformation to restore it via
restoreStatus(java.lang.Object) . |
void |
screenTransform(double m00,
double m01,
double m02,
double m10,
double m11,
double m12)
Transforms the ScreenTransformation with the given transformation matrix. |
java.awt.Point |
transform(java.lang.Object point)
Transforms one point object in user space to a point on the screen. |
java.awt.Point[] |
transform(java.lang.Object[] points,
int off,
int len)
Transforms a subarray of point objects in user space to a point array in screen coordinates. |
Methods inherited from class gishur.gui2.ScreenTransformation |
bounds, deltaTransform, inverseDeltaTransform, inverseTransform, inverseTransform, rotate, rotate, rotate, scale, scale, transform, transformedBounds, translate, zoomTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ScreenX2Transformation()
Method Detail |
public java.lang.Object saveStatus()
ScreenTransformation
to restore it via
restoreStatus(java.lang.Object)
.saveStatus
in class ScreenTransformation
ScreenTransformation
.public void restoreStatus(java.lang.Object status)
saveStatus()
.restoreStatus
in class ScreenTransformation
status
- the status to restore (must be saved via saveStatus()
).public java.awt.Point transform(java.lang.Object point)
transform
in class ScreenTransformation
point
- point object in user spacepublic java.awt.Point[] transform(java.lang.Object[] points, int off, int len)
transform
in class ScreenTransformation
points
- array of point objects in user spaceoff
- offset of the subarraylen
- length of the subarraypublic java.lang.Object inverseTransform(int x, int y)
inverseTransform
in class ScreenTransformation
point
- point in screen coordinatespublic java.lang.Object[] inverseTransform(java.awt.Point[] points, int off, int len)
inverseTransform
in class ScreenTransformation
points
- array of points in screen coordinatesoff
- offset of the subarraylen
- length of the subarraypublic java.awt.Point deltaTransform(java.lang.Object point)
deltaTransform
in class ScreenTransformation
point
- vector in user spacepublic java.awt.Point[] deltaTransform(java.lang.Object[] points, int off, int len)
deltaTransform
in class ScreenTransformation
points
- array of relative distance vector objects in user spaceoff
- offset of the subarraylen
- length of the subarraypublic java.lang.Object inverseDeltaTransform(java.awt.Point point)
inverseDeltaTransform
in class ScreenTransformation
point
- vector in user spacepublic java.lang.Object inverseDeltaTransform(java.awt.Point[] points, int off, int len)
inverseDeltaTransform
in class ScreenTransformation
points
- array of relative distance vectors in screen coordinatesoff
- offset of the subarraylen
- length of the subarraypublic AffineTransformation inverseTransform(double m00, double m01, double m02, double m10, double m11, double m12)
T
be the
screen transformation matrix used to transform objects from user space
to screen coordinates, let T'
be its inverse and A
the given matrix, the returned matrix is T'AT
.m00,m01,m02
- first row of the transformation matrixm10,m11,m12
- second row of the transformation matrixpublic void resetTransform()
resetTransform
in class ScreenTransformation
public void screenTransform(double m00, double m01, double m02, double m10, double m11, double m12)
screenTransform
in class ScreenTransformation
m00,m01,m02
- first row of the transformation matrixm10,m11,m12
- second row of the transformation matrix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |