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
BezierCurves. |
| 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)
|
boolean |
equals(java.lang.Object o) |
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 BezierCurves need to be connected with each other
and the closing segment has to be supplied, too, otherwise an
IllegalArgumentException is thrown.curvedSides - the BezierCurves representing the edges of the new
CurvedPolygonpublic CurvedPolygon(java.util.List<BezierCurve> curvedSides)
CurvedPolygon from the given list of
BezierCurves. Subsequent BezierCurves need to be
connected with each other and the closing segment has to be supplied,
too, otherwise an IllegalArgumentException is thrown.curvedSides - the BezierCurves representing the edges of the new
CurvedPolygonCurvedPolygon(BezierCurve...)public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic Point getCenter()
Point of this
CurvedPolygon.Point of this
CurvedPolygonpublic CurvedPolygon getCopy()
IGeometryIGeometry.public PolyBezier getOutline()
IShapegetOutline in interface IShapeICurve representing this IShape's outline.public BezierCurve[] getOutlineSegments()
IShapegetOutlineSegments in interface IShapeICurve segments of this IShape's outline.public CurvedPolygon getRotatedCCW(Angle angle)
IRotatableAngle 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 AngleIGeometry representing the result of the rotationpublic CurvedPolygon getRotatedCCW(Angle angle, double cx, double cy)
IRotatableAngle
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 Anglecx - 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)
IRotatableAngle
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 Anglecenter - relative Point for the rotationIGeometry representing the result of the rotationpublic CurvedPolygon getRotatedCW(Angle angle)
IRotatableAngle clock-wise (CW)
around its center Point. Does not necessarily return an object of
the same type.getRotatedCW in interface IRotatable<CurvedPolygon>angle - rotation AngleIGeometry representing the result of the rotationpublic CurvedPolygon getRotatedCW(Angle angle, double cx, double cy)
IRotatableAngle 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 Anglecx - 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)
IRotatableAngle 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 Anglecenter - relative Point for the rotationIGeometry representing the result of the rotationpublic CurvedPolygon getScaled(double factor)
IScalablePoint.getScaled in interface IScalable<CurvedPolygon>factor - scale-factorpublic CurvedPolygon getScaled(double fx, double fy)
IScalablePoint.getScaled in interface IScalable<CurvedPolygon>fx - x-scale-factorfy - y-scale-factorpublic CurvedPolygon getScaled(double factor, double cx, double cy)
IScalablePoint (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)
IScalablePoint (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)
IScalablePoint.getScaled in interface IScalable<CurvedPolygon>fx - x-scale-factorfy - y-scale-factorcenter - relative Point for the scalingpublic CurvedPolygon getScaled(double factor, Point center)
IScalablePoint.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 IGeometrygetTransformed in interface IShapet - The AffineTransform to be appliedPath representation of this
IGeometryIGeometry.getTransformed(AffineTransform)public CurvedPolygon getTranslated(double dx, double dy)
ITranslatablegetTranslated in interface ITranslatable<CurvedPolygon>dx - x-translationdy - y-translationpublic CurvedPolygon getTranslated(Point d)
ITranslatablePoint.getTranslated in interface ITranslatable<CurvedPolygon>d - translation Pointpublic CurvedPolygon rotateCCW(Angle angle)
CurvedPolygon counter-clockwise (CCW) by the given
Angle around the center Point of this
CurvedPolygon.angle - the rotation Anglethis 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 Anglethis 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)
IScalablePoint.scale in interface IScalable<CurvedPolygon>factor - scale-factorthis for conveniencepublic CurvedPolygon scale(double fx, double fy)
IScalablePoint.scale in interface IScalable<CurvedPolygon>fx - x-scale-factorfy - y-scale-factorthis for conveniencepublic CurvedPolygon scale(double factor, double cx, double cy)
IScalablePoint (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)
IScalablePoint (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)
IScalablePoint.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)
IScalablePoint.scale in interface IScalable<CurvedPolygon>factor - scale-factorcenter - relative Point for the scalingthis for conveniencepublic java.lang.String toString()
toString in class java.lang.Objectpublic CurvedPolygon translate(double dx, double dy)
ITranslatabletranslate in interface ITranslatable<CurvedPolygon>dx - x-translationdy - y-translationthis for conveniencepublic CurvedPolygon translate(Point d)
ITranslatablePoint.translate in interface ITranslatable<CurvedPolygon>d - translation Pointthis for conveniencepublic java.lang.Object clone()
Cloneable
.clone in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()Copyright (c) 2014 itemis AG, and others. All rights reserved.