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
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)
and
scale(double, double, double, double)
methods are directly applied
to the calling object. They scale it by the given factor(s) around the given
Point
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)
and
getScaled(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
Modifier and TypeMethodDescriptiongetScaled
(double factor) Scales a copy of the calling object by the given factor relative to its centerPoint
.getScaled
(double fx, double fy) Scales a copy of the calling object by the given factors relative to its centerPoint
.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
(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).Scales a copy of the calling object by the given factors relative to the given centerPoint
.Scales a copy of the calling object by the given factor relative to the given centerPoint
.scale
(double factor) Scales the calling object by the given factor relative to its centerPoint
.scale
(double fx, double fy) Scales the calling object by the given factors relative to the given centerPoint
.scale
(double factor, double cx, double cy) Scales the calling object by the given factor relative to the given centerPoint
(cx, cy).scale
(double fx, double fy, double cx, double cy) Scales the calling object by the given factors relative to the given centerPoint
(cx, cy).Scales the calling object by the given factors relative to the given centerPoint
.Scales the calling object by the given factor relative to the given centerPoint
.
-
Method Details
-
getScaled
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
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
Scales a copy of the calling object by the given factor relative to the given centerPoint
(cx, cy). -
getScaled
Scales a copy of the calling object by the given factors relative to the given centerPoint
(cx, cy). -
getScaled
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
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
Scales the calling object by the given factor relative to its centerPoint
.- Parameters:
factor
- scale-factor- Returns:
this
for convenience
-
scale
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
Scales the calling object by the given factor relative to the given centerPoint
(cx, cy). -
scale
Scales the calling object by the given factors relative to the given centerPoint
(cx, cy). -
scale
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
-
scale
Scales the calling object by the given factor relative to the given centerPoint
.- Parameters:
factor
- scale-factorcenter
- relativePoint
for the scaling- Returns:
this
for convenience
-