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
IScalable
interface 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 givenPoint
or 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
Point
for 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 T
getScaled(double factor)
Scales a copy of the calling object by the given factor relative to its centerPoint
.T
getScaled(double fx, double fy)
Scales a copy of the calling object by the given factors relative to its centerPoint
.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).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).T
getScaled(double fx, double fy, Point center)
Scales a copy of the calling object by the given factors relative to the given centerPoint
.T
getScaled(double factor, Point center)
Scales a copy of the calling object by the given factor relative to the given centerPoint
.T
scale(double factor)
Scales the calling object by the given factor relative to its centerPoint
.T
scale(double fx, double fy)
Scales the calling object by the given factors relative to the given centerPoint
.T
scale(double factor, double cx, double cy)
Scales the calling object by the given factor relative to the given centerPoint
(cx, cy).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).T
scale(double fx, double fy, Point center)
Scales the calling object by the given factors relative to the given centerPoint
.T
scale(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
- relativePoint
for 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
- relativePoint
for 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:
this
for 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:
this
for 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
- relativePoint
for the scaling- Returns:
this
for convenience
-
-