Package org.eclipse.gef.geometry.planar
Interface ITranslatable<T extends IGeometry>
- Type Parameters:
T
- the implementing type
- All Known Implementing Classes:
Arc
,BezierCurve
,CubicCurve
,CurvedPolygon
,Ellipse
,Line
,Pie
,PolyBezier
,Polygon
,Polyline
,QuadraticCurve
,Rectangle
,Region
,Ring
,RoundedRectangle
public interface ITranslatable<T extends IGeometry>
The ITranslatable
interface collects all translation short-cut
methods.
Translation can be applied directly on an object via the
translate(Point)
and translate(double, double)
methods.
They return the scaled, calling object for convenience.
On the other hand, the getTranslated(Point)
and
getTranslated(double, double)
methods create a translated copy of
the original object.
-
Method Summary
Modifier and TypeMethodDescriptiongetTranslated
(double dx, double dy) Translates a copy of this object by the given values in x and y direction.Translates a copy of this object by the givenPoint
.translate
(double dx, double dy) Translates the object by the given values in x and y direction.Translates the object by the givenPoint
.
-
Method Details
-
getTranslated
Translates a copy of this object by the given values in x and y direction.- Parameters:
dx
- x-translationdy
- y-translation- Returns:
- a new, translated object
-
getTranslated
Translates a copy of this object by the givenPoint
.- Parameters:
d
- translationPoint
- Returns:
- a new, translated object
-
translate
Translates the object by the given values in x and y direction.- Parameters:
dx
- x-translationdy
- y-translation- Returns:
this
for convenience
-
translate
Translates the object by the givenPoint
.- Parameters:
d
- translationPoint
- Returns:
this
for convenience
-