|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.visu.epsgraphics.objects.EpsTransform
public class EpsTransform
this class represents an eps transformation. It is used to represent affine transformations
Field Summary | |
---|---|
protected AffineTransform |
at
user defined transformations |
protected static String[] |
code
postscript code definition |
protected boolean |
rad
boolean defining whether given theta is in degree or radiant, default: rad |
protected double |
theta
theta parameter for angles (in degree) |
protected int |
type
transformation types. |
static int |
TYPE_ROTATE
rotation |
static int |
TYPE_ROTATE2
"extended rotation" consisting of translation, rotation, and reverse translation |
static int |
TYPE_SCALE
scaling |
static int |
TYPE_SHEAR
performs shearing |
static int |
TYPE_TRANSFORM
user defined transformation |
static int |
TYPE_TRANSLATE
translation |
protected double |
x
x parameter for points/vectors |
protected double |
y
y parameter for points/vectors |
Constructor Summary | |
---|---|
EpsTransform(AffineTransform at)
Constructs an Eps Transformation object which is equivalent by the given AffineTransform |
|
EpsTransform(double theta)
Constructs an Eps Transformation object which performs a rotation by a given angle theta in degree. |
|
EpsTransform(double theta,
double x,
double y)
Constructs an Eps Transfomration object which performs an "extended rotation": Calling this method is equivalent to translate(x,y);
rotate(theta);
translate(-x,-y); |
|
EpsTransform(int type,
double x,
double y)
Constructs an Eps Transformation object which performs a transformation given by the parameters. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
boolean |
isRadiant()
ability to check if angles are treated as radiant or degree values |
void |
setToDegree()
specify theta angles to be degree values (range 0-360) the given values are not changed. |
void |
setToRadiant()
specify theta angles to be radiant values. |
String |
toEps()
returns a String that represents the object in postscript code |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_TRANSFORM
public static final int TYPE_SCALE
public static final int TYPE_TRANSLATE
public static final int TYPE_ROTATE
public static final int TYPE_ROTATE2
public static final int TYPE_SHEAR
protected static final String[] code
protected int type
TYPE_SCALE
, TYPE_ROTATE
, TYPE_ROTATE2
TYPE_SHEAR
and TYPE_TRANSFORM
protected double x
protected double y
protected double theta
protected AffineTransform at
protected boolean rad
Constructor Detail |
---|
public EpsTransform(AffineTransform at)
at
- The transformation which should be represented by this objectpublic EpsTransform(int type, double x, double y)
type
- The type of the transformation.
May be TYPE_TRANSLATE
, TYPE_SCALE
or TYPE_SHEAR
.x
- The x parameter for the transformationy
- The y coordinate for the transformationpublic EpsTransform(double theta)
theta
- the rotation angle in degree (0-360).public EpsTransform(double theta, double x, double y)
translate(x,y);
rotate(theta);
translate(-x,-y);
theta
- The rotation angle in degreex
- The x coordinate for translationy
- The y coordinate for translationMethod Detail |
---|
public void setToRadiant()
public void setToDegree()
public boolean isRadiant()
public String toEps()
EpsObject
toEps
in interface EpsObject
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |