org.eclipse.draw2d.geometry
Class Transform
java.lang.Object
|
+--org.eclipse.draw2d.geometry.Transform
- public class Transform
- extends Object
Provides support for transformations of scaling,
translation and rotation.
|
Method Summary |
Point |
getTransformed(Point p)
Returns a new transformed Point of the input Point
based on the transformation values set. |
void |
setRotation(double angle)
Sets the angle by which rotation is to be done. |
void |
setScale(double scale)
Sets the value for the amount of scaling to be done
along all axes. |
void |
setScale(double x,
double y)
Sets the amount of scaling to be done along X and Y
axes individually. |
void |
setTranslation(double x,
double y)
Sets the translation amounts for both axes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Transform
public Transform()
setScale
public void setScale(double scale)
- Sets the value for the amount of scaling to be done
along all axes.
- Parameters:
scale - Value by which scaling has to be done.- Since:
- 2.0
- See Also:
setScale(double,double)
setScale
public void setScale(double x,
double y)
- Sets the amount of scaling to be done along X and Y
axes individually.
- Parameters:
x - Amount of scaling on X axis.y - Amount of scaling on Y axis.- Since:
- 2.0
- See Also:
setScale(double)
setRotation
public void setRotation(double angle)
- Sets the angle by which rotation is to be done.
- Parameters:
angle - Angle of rotation.- Since:
- 2.0
setTranslation
public void setTranslation(double x,
double y)
- Sets the translation amounts for both axes.
- Parameters:
x - Amount of shift on X axis.y - Amount of shift on Y axis.- Since:
- 2.0
getTransformed
public Point getTransformed(Point p)
- Returns a new transformed Point of the input Point
based on the transformation values set.
- Parameters:
p - Point being transformed.- Returns:
- The transformed Point.
- Since:
- 2.0