Interface IScalable<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 IScalable<T extends IGeometry>The
IScalableinterface collects all scaling short-cut methods.The
scale(double),scale(double, double),scale(double, Point),scale(double, double, double),scale(double, double, Point)andscale(double, double, double, double)methods are directly applied to the calling object. They scale it by the given factor(s) around the givenPointor an appropriate default.On the other hand, the
getScaled(double),getScaled(double, double),getScaled(double, Point),getScaled(double, double, double),getScaled(double, double, Point)andgetScaled(double, double, double, double)methods are applied to a copy of the calling object.If you do not specify the relative
Pointfor the scaling, the implementation will appropriately choose one. In most cases, this will be the center of the scaled object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetScaled(double factor)Scales a copy of the calling object by the given factor relative to its centerPoint.TgetScaled(double fx, double fy)Scales a copy of the calling object by the given factors relative to its centerPoint.TgetScaled(double factor, double cx, double cy)Scales a copy of the calling object by the given factor relative to the given centerPoint(cx, cy).TgetScaled(double fx, double fy, double cx, double cy)Scales a copy of the calling object by the given factors relative to the given centerPoint(cx, cy).TgetScaled(double fx, double fy, Point center)Scales a copy of the calling object by the given factors relative to the given centerPoint.TgetScaled(double factor, Point center)Scales a copy of the calling object by the given factor relative to the given centerPoint.Tscale(double factor)Scales the calling object by the given factor relative to its centerPoint.Tscale(double fx, double fy)Scales the calling object by the given factors relative to the given centerPoint.Tscale(double factor, double cx, double cy)Scales the calling object by the given factor relative to the given centerPoint(cx, cy).Tscale(double fx, double fy, double cx, double cy)Scales the calling object by the given factors relative to the given centerPoint(cx, cy).Tscale(double fx, double fy, Point center)Scales the calling object by the given factors relative to the given centerPoint.Tscale(double factor, Point center)Scales the calling object by the given factor relative to the given centerPoint.
-
-
-
Method Detail
-
getScaled
T getScaled(double factor)
Scales a copy of the calling object by the given factor relative to its centerPoint.- Parameters:
factor- scale-factor- Returns:
- the new, scaled object
-
getScaled
T getScaled(double fx, double fy)
Scales a copy of the calling object by the given factors relative to its centerPoint.- Parameters:
fx- x-scale-factorfy- y-scale-factor- Returns:
- the new, scaled object
-
getScaled
T getScaled(double factor, double cx, double cy)
Scales a copy of the calling object by the given factor relative to the given centerPoint(cx, cy).
-
getScaled
T getScaled(double fx, double fy, double cx, double cy)
Scales a copy of the calling object by the given factors relative to the given centerPoint(cx, cy).
-
getScaled
T getScaled(double fx, double fy, Point center)
Scales a copy of the calling object by the given factors relative to the given centerPoint.- Parameters:
fx- x-scale-factorfy- y-scale-factorcenter- relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
T getScaled(double factor, Point center)
Scales a copy of the calling object by the given factor relative to the given centerPoint.- Parameters:
factor- scale-factorcenter- relativePointfor the scaling- Returns:
- the new, scaled object
-
scale
T scale(double factor)
Scales the calling object by the given factor relative to its centerPoint.- Parameters:
factor- scale-factor- Returns:
thisfor convenience
-
scale
T scale(double fx, double fy)
Scales the calling object by the given factors relative to the given centerPoint.- Parameters:
fx- x-scale-factorfy- y-scale-factor- Returns:
thisfor convenience
-
scale
T scale(double factor, double cx, double cy)
Scales the calling object by the given factor relative to the given centerPoint(cx, cy).
-
scale
T scale(double fx, double fy, double cx, double cy)
Scales the calling object by the given factors relative to the given centerPoint(cx, cy).
-
scale
T scale(double fx, double fy, Point center)
Scales the calling object by the given factors relative to the given centerPoint.- Parameters:
fx- x-scale-factorfy- y-scale-factorcenter- relativePointfor the scaling- Returns:
thisfor convenience
-
-