|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.chart2D.engine.Transformation
public class Transformation extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
Class responsible for transforming coordinates according to transformation matrix or specified angle of rotation (matrix is formed then).
| Modifier and Type | Field and Description |
|---|---|
protected int |
dimension
Dimension of the transformation matrix. |
protected double[] |
matrix
|
| Constructor and Description |
|---|
Transformation()
Default transformation matrix constructor, which has no effect on transforming point. |
Transformation(double angle)
Transformation matrix constructor |
Transformation(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Transformation matrix constructor |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
clone()
|
java.awt.geom.AffineTransform |
getAffineTransform()
Returns affine transformation |
double |
getXScale()
Gets the x scale |
double |
getXShear()
Gets x shear |
double |
getXShift()
Gets x shift |
double |
getYScale()
Gets y scale |
double |
getYShear()
Gets y shear |
double |
getYShift()
Gets y shift |
void |
setXScale(double value)
Sets the x scale |
void |
setXShear(double value)
Sets x shear |
void |
setXShift(double value)
Sets x shift |
void |
setYScale(double value)
Sets y scale |
void |
setYShear(double value)
Sets y shear |
void |
setYShift(double value)
Sets y shift |
Point2D |
transform(Point2D vectorPoint,
double x,
double y)
Transforms the point according to transformation matrix |
Point2D |
transform(Point2D vectorPoint,
Point2D anchor)
Transforms the point according a transformation matrix |
Rectangle2D |
transform(Rectangle2D bounds)
Transforms rectangle bounds according a transformation matrix |
void |
transformInplace(Point2D vectorPoint,
double x,
double y)
Transforms the point according to transformation matrix. |
Rectangle2D |
transformInplace(Rectangle2D bounds)
Transforms rectangle bounds according a transformation matrix. |
void |
transformWithoutTranslateInplace(Point2D vectorPoint)
Transforms the point according a transformation matrix. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double[] matrix
protected int dimension
| Constructor Detail |
|---|
public Transformation()
public Transformation(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
m00 - 0 row, 0 column value. X scale.m10 - 1 row, 0 column value. X shear.m01 - 0 row, 1 column value. Y shear.m11 - 1 row, 1 column value. Y scale.m02 - 0 row, 2 column value. X shift.m12 - 1 row, 2 column value. Y shift.public Transformation(double angle)
angle - point rotation angle in radians.| Method Detail |
|---|
public Point2D transform(Point2D vectorPoint,
double x,
double y)
vectorPoint - the point to transformx - x anchor pointy - y anchor point
public void transformInplace(Point2D vectorPoint,
double x,
double y)
vectorPoint - the point to transformx - x anchor pointy - y anchor point
public Point2D transform(Point2D vectorPoint,
Point2D anchor)
vectorPoint - the point to transformanchor - anchor pointpublic void transformWithoutTranslateInplace(Point2D vectorPoint)
vectorPoint - the point to transformpublic Rectangle2D transform(Rectangle2D bounds)
bounds - rectangle bounds as double valuespublic Rectangle2D transformInplace(Rectangle2D bounds)
bounds - rectangle bounds as double valuespublic double getXScale()
public double getYScale()
public double getXShift()
public double getYShift()
public double getXShear()
public double getYShear()
public void setXScale(double value)
value - x scalepublic void setYScale(double value)
value - y scalepublic void setXShift(double value)
value - x shiftpublic void setYShift(double value)
value - y shiftpublic void setXShear(double value)
value - x shiftpublic void setYShear(double value)
value - y shiftprotected java.lang.Object clone()
clone in class java.lang.Objectpublic java.awt.geom.AffineTransform getAffineTransform()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||