public class CurvedPolygon extends java.lang.Object implements IShape, ITranslatable<CurvedPolygon>, IRotatable<CurvedPolygon>, IScalable<CurvedPolygon>
Constructor and Description |
---|
CurvedPolygon(BezierCurve... curvedSides)
Constructs a new
CurvedPolygon from the given BezierCurve
s. |
CurvedPolygon(java.util.List<BezierCurve> curvedSides)
Constructs a new
CurvedPolygon from the given list of
BezierCurve s. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Overridden with public visibility as recommended within
Cloneable
. |
boolean |
contains(IGeometry g)
|
boolean |
contains(Point p)
|
Rectangle |
getBounds()
|
Point |
getCenter()
Returns an approximated center
Point of this
CurvedPolygon . |
CurvedPolygon |
getCopy()
Returns a new identical copy of this
IGeometry . |
PolyBezier |
getOutline()
|
BezierCurve[] |
getOutlineSegments()
|
CurvedPolygon |
getRotatedCCW(Angle angle)
|
CurvedPolygon |
getRotatedCCW(Angle angle,
double cx,
double cy)
|
CurvedPolygon |
getRotatedCCW(Angle angle,
Point center)
|
CurvedPolygon |
getRotatedCW(Angle angle)
|
CurvedPolygon |
getRotatedCW(Angle angle,
double cx,
double cy)
|
CurvedPolygon |
getRotatedCW(Angle angle,
Point center)
|
CurvedPolygon |
getScaled(double factor)
Scales a copy of the calling object by the given factor relative to its
center
Point . |
CurvedPolygon |
getScaled(double fx,
double fy)
Scales a copy of the calling object by the given factors relative to its
center
Point . |
CurvedPolygon |
getScaled(double factor,
double cx,
double cy)
Scales a copy of the calling object by the given factor relative to the
given center
Point (cx, cy). |
CurvedPolygon |
getScaled(double fx,
double fy,
double cx,
double cy)
Scales a copy of the calling object by the given factors relative to the
given center
Point (cx, cy). |
CurvedPolygon |
getScaled(double fx,
double fy,
Point center)
Scales a copy of the calling object by the given factors relative to the
given center
Point . |
CurvedPolygon |
getScaled(double factor,
Point center)
Scales a copy of the calling object by the given factor relative to the
given center
Point . |
CurvedPolygon |
getTransformed(AffineTransform t)
|
CurvedPolygon |
getTranslated(double dx,
double dy)
Translates a copy of this object by the given values in x and y
direction.
|
CurvedPolygon |
getTranslated(Point d)
Translates a copy of this object by the given
Point . |
int |
hashCode() |
CurvedPolygon |
rotateCCW(Angle angle)
Rotates this
CurvedPolygon counter-clockwise (CCW) by the given
Angle around the center Point of this
CurvedPolygon . |
CurvedPolygon |
rotateCCW(Angle angle,
double cx,
double cy)
Rotates this
CurvedPolygon counter-clockwise (CCW) by the given
Angle around the Point specified by the given x and y
coordinates. |
CurvedPolygon |
rotateCCW(Angle angle,
Point center)
|
CurvedPolygon |
rotateCW(Angle angle)
Rotates this
CurvedPolygon counter-clockwise (CCW) by the given
Angle around the center Point of this
CurvedPolygon . |
CurvedPolygon |
rotateCW(Angle angle,
double cx,
double cy)
Rotates this
CurvedPolygon clockwise (CW) by the given
Angle around the Point specified by the given x and y
coordinates. |
CurvedPolygon |
rotateCW(Angle angle,
Point center)
|
CurvedPolygon |
scale(double factor)
Scales the calling object by the given factor relative to its center
Point . |
CurvedPolygon |
scale(double fx,
double fy)
Scales the calling object by the given factors relative to the given
center
Point . |
CurvedPolygon |
scale(double factor,
double cx,
double cy)
Scales the calling object by the given factor relative to the given
center
Point (cx, cy). |
CurvedPolygon |
scale(double fx,
double fy,
double cx,
double cy)
Scales the calling object by the given factors relative to the given
center
Point (cx, cy). |
CurvedPolygon |
scale(double fx,
double fy,
Point center)
Scales the calling object by the given factors relative to the given
center
Point . |
CurvedPolygon |
scale(double factor,
Point center)
Scales the calling object by the given factor relative to the given
center
Point . |
Path |
toPath()
|
java.lang.String |
toString() |
boolean |
touches(IGeometry g)
|
CurvedPolygon |
translate(double dx,
double dy)
Translates the object by the given values in x and y direction.
|
CurvedPolygon |
translate(Point d)
Translates the object by the given
Point . |
public CurvedPolygon(BezierCurve... curvedSides)
CurvedPolygon
from the given BezierCurve
s. Subsequent BezierCurve
s need to be connected with each other
and the closing segment has to be supplied, too, otherwise an
IllegalArgumentException
is thrown.curvedSides
- the BezierCurve
s representing the edges of the new
CurvedPolygon
public CurvedPolygon(java.util.List<BezierCurve> curvedSides)
CurvedPolygon
from the given list of
BezierCurve
s. Subsequent BezierCurve
s need to be
connected with each other and the closing segment has to be supplied,
too, otherwise an IllegalArgumentException
is thrown.curvedSides
- the BezierCurve
s representing the edges of the new
CurvedPolygon
CurvedPolygon(BezierCurve...)
public Point getCenter()
Point
of this
CurvedPolygon
.Point
of this
CurvedPolygon
public CurvedPolygon getCopy()
IGeometry
IGeometry
.public PolyBezier getOutline()
IShape
getOutline
in interface IShape
ICurve
representing this IShape
's outline.public BezierCurve[] getOutlineSegments()
IShape
getOutlineSegments
in interface IShape
ICurve
segments of this IShape
's outline.public CurvedPolygon getRotatedCCW(Angle angle)
IRotatable
Angle
counter-clock-wise
(CCW) around its center Point
. Does not necessarily return an
object of the same type.getRotatedCCW
in interface IRotatable<CurvedPolygon>
angle
- rotation Angle
IGeometry
representing the result of the rotationpublic CurvedPolygon getRotatedCCW(Angle angle, double cx, double cy)
IRotatable
Angle
counter-clock-wise (CCW) around the specified center Point
(cx,
cy). Does not necessarily return an object of the same type.getRotatedCCW
in interface IRotatable<CurvedPolygon>
angle
- rotation Angle
cx
- x-coordinate of the relative Point
for the rotationcy
- y-coordinate of the relative Point
for the rotationIGeometry
representing the result of the rotationpublic CurvedPolygon getRotatedCCW(Angle angle, Point center)
IRotatable
Angle
counter-clock-wise (CCW) around the specified center Point
. Does
not necessarily return an object of the same type.getRotatedCCW
in interface IRotatable<CurvedPolygon>
angle
- rotation Angle
center
- relative Point
for the rotationIGeometry
representing the result of the rotationpublic CurvedPolygon getRotatedCW(Angle angle)
IRotatable
Angle
clock-wise (CW)
around its center Point
. Does not necessarily return an object of
the same type.getRotatedCW
in interface IRotatable<CurvedPolygon>
angle
- rotation Angle
IGeometry
representing the result of the rotationpublic CurvedPolygon getRotatedCW(Angle angle, double cx, double cy)
IRotatable
Angle
clock-wise (CW)
around the specified center Point
(cx, cy). Does not necessarily
return an object of the same type.getRotatedCW
in interface IRotatable<CurvedPolygon>
angle
- rotation Angle
cx
- x-coordinate of the relative Point
for the rotationcy
- y-coordinate of the relative Point
for the rotationIGeometry
representing the result of the rotationpublic CurvedPolygon getRotatedCW(Angle angle, Point center)
IRotatable
Angle
clock-wise (CW)
around the specified center Point
. Does not necessarily return an
object of the same type.getRotatedCW
in interface IRotatable<CurvedPolygon>
angle
- rotation Angle
center
- relative Point
for the rotationIGeometry
representing the result of the rotationpublic CurvedPolygon getScaled(double factor)
IScalable
Point
.getScaled
in interface IScalable<CurvedPolygon>
factor
- scale-factorpublic CurvedPolygon getScaled(double fx, double fy)
IScalable
Point
.getScaled
in interface IScalable<CurvedPolygon>
fx
- x-scale-factorfy
- y-scale-factorpublic CurvedPolygon getScaled(double factor, double cx, double cy)
IScalable
Point
(cx, cy).getScaled
in interface IScalable<CurvedPolygon>
factor
- scale-factorcx
- x-coordinate of the relative Point
for the scalingcy
- y-coordinate of the relative Point
for the scalingpublic CurvedPolygon getScaled(double fx, double fy, double cx, double cy)
IScalable
Point
(cx, cy).getScaled
in interface IScalable<CurvedPolygon>
fx
- x-scale-factorfy
- y-scale-factorcx
- x-coordinate of the relative Point
for the scalingcy
- y-coordinate of the relative Point
for the scalingpublic CurvedPolygon getScaled(double fx, double fy, Point center)
IScalable
Point
.getScaled
in interface IScalable<CurvedPolygon>
fx
- x-scale-factorfy
- y-scale-factorcenter
- relative Point
for the scalingpublic CurvedPolygon getScaled(double factor, Point center)
IScalable
Point
.getScaled
in interface IScalable<CurvedPolygon>
factor
- scale-factorcenter
- relative Point
for the scalingpublic CurvedPolygon getTransformed(AffineTransform t)
Path
representation of this IGeometry
. Subclasses may override this
method to return a more specific representation.getTransformed
in interface IGeometry
getTransformed
in interface IShape
t
- The AffineTransform
to be appliedPath
representation of this
IGeometry
IGeometry.getTransformed(AffineTransform)
public CurvedPolygon getTranslated(double dx, double dy)
ITranslatable
getTranslated
in interface ITranslatable<CurvedPolygon>
dx
- x-translationdy
- y-translationpublic CurvedPolygon getTranslated(Point d)
ITranslatable
Point
.getTranslated
in interface ITranslatable<CurvedPolygon>
d
- translation Point
public CurvedPolygon rotateCCW(Angle angle)
CurvedPolygon
counter-clockwise (CCW) by the given
Angle
around the center Point
of this
CurvedPolygon
.angle
- the rotation Angle
this
for conveniencepublic CurvedPolygon rotateCCW(Angle angle, double cx, double cy)
CurvedPolygon
counter-clockwise (CCW) by the given
Angle
around the Point
specified by the given x and y
coordinates.public CurvedPolygon rotateCCW(Angle angle, Point center)
public CurvedPolygon rotateCW(Angle angle)
CurvedPolygon
counter-clockwise (CCW) by the given
Angle
around the center Point
of this
CurvedPolygon
.angle
- the rotation Angle
this
for conveniencepublic CurvedPolygon rotateCW(Angle angle, double cx, double cy)
CurvedPolygon
clockwise (CW) by the given
Angle
around the Point
specified by the given x and y
coordinates.public CurvedPolygon rotateCW(Angle angle, Point center)
public CurvedPolygon scale(double factor)
IScalable
Point
.scale
in interface IScalable<CurvedPolygon>
factor
- scale-factorthis
for conveniencepublic CurvedPolygon scale(double fx, double fy)
IScalable
Point
.scale
in interface IScalable<CurvedPolygon>
fx
- x-scale-factorfy
- y-scale-factorthis
for conveniencepublic CurvedPolygon scale(double factor, double cx, double cy)
IScalable
Point
(cx, cy).scale
in interface IScalable<CurvedPolygon>
factor
- scale-factorcx
- x-coordinate of the relative Point
for the scalingcy
- y-coordinate of the relative Point
for the scalingthis
for conveniencepublic CurvedPolygon scale(double fx, double fy, double cx, double cy)
IScalable
Point
(cx, cy).scale
in interface IScalable<CurvedPolygon>
fx
- x-scale-factorfy
- y-scale-factorcx
- x-coordinate of the relative Point
for the scalingcy
- y-coordinate of the relative Point
for the scalingthis
for conveniencepublic CurvedPolygon scale(double fx, double fy, Point center)
IScalable
Point
.scale
in interface IScalable<CurvedPolygon>
fx
- x-scale-factorfy
- y-scale-factorcenter
- relative Point
for the scalingthis
for conveniencepublic CurvedPolygon scale(double factor, Point center)
IScalable
Point
.scale
in interface IScalable<CurvedPolygon>
factor
- scale-factorcenter
- relative Point
for the scalingthis
for conveniencepublic java.lang.String toString()
toString
in class java.lang.Object
public CurvedPolygon translate(double dx, double dy)
ITranslatable
translate
in interface ITranslatable<CurvedPolygon>
dx
- x-translationdy
- y-translationthis
for conveniencepublic CurvedPolygon translate(Point d)
ITranslatable
Point
.translate
in interface ITranslatable<CurvedPolygon>
d
- translation Point
this
for conveniencepublic java.lang.Object clone()
Cloneable
.clone
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
Copyright (c) 2014 itemis AG, and others. All rights reserved.