Package org.eclipse.draw2d.geometry
Class Transform
java.lang.Object
org.eclipse.draw2d.geometry.Transform
Provides support for transformations of scaling, translation and rotation.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a new transformed Point of the input Point based on the transformation values set.voidsetRotation(double angle) Sets the rotation angle.voidsetScale(double scale) Sets the value for the amount of scaling to be done along both axes.voidsetScale(double x, double y) Sets the value for the amount of scaling to be done along X and Y axes individually.voidsetTranslation(double x, double y) Sets the translation amounts for both axes.
- 
Constructor Details- 
Transformpublic Transform()
 
- 
- 
Method Details- 
setScalepublic void setScale(double scale) Sets the value for the amount of scaling to be done along both axes.- Parameters:
- scale- Scale factor
- Since:
- 2.0
 
- 
setScalepublic void setScale(double x, double y) Sets the value for 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
 
- 
setRotationpublic void setRotation(double angle) Sets the rotation angle.- Parameters:
- angle- Angle of rotation
- Since:
- 2.0
 
- 
setTranslationpublic 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
 
- 
getTransformedReturns 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
 
 
-