Package org.eclipse.gef.geometry.planar
Class CurvedPolygon
java.lang.Object
org.eclipse.gef.geometry.planar.CurvedPolygon
- All Implemented Interfaces:
Serializable,Cloneable,IGeometry,IRotatable<CurvedPolygon>,IScalable<CurvedPolygon>,IShape,ITranslatable<CurvedPolygon>
public class CurvedPolygon
extends Object
implements IShape, ITranslatable<CurvedPolygon>, IRotatable<CurvedPolygon>, IScalable<CurvedPolygon>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCurvedPolygon(List<BezierCurve> curvedSides) Constructs a newCurvedPolygonfrom the given list ofBezierCurves.CurvedPolygon(BezierCurve... curvedSides) Constructs a newCurvedPolygonfrom the givenBezierCurves. -
Method Summary
Modifier and TypeMethodDescriptionclone()Overridden with public visibility as recommended withinCloneable.booleanbooleanbooleanReturns an approximated centerPointof thisCurvedPolygon.getCopy()Returns a new identical copy of thisIGeometry.getRotatedCCW(Angle angle) getRotatedCCW(Angle angle, double cx, double cy) getRotatedCCW(Angle angle, Point center) getRotatedCW(Angle angle) getRotatedCW(Angle angle, double cx, double cy) getRotatedCW(Angle angle, Point center) getScaled(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.getTranslated(double dx, double dy) Translates a copy of this object by the given values in x and y direction.Translates a copy of this object by the givenPoint.final inthashCode()Rotates thisCurvedPolygoncounter-clockwise (CCW) by the givenAnglearound the centerPointof thisCurvedPolygon.Rotates thisCurvedPolygoncounter-clockwise (CCW) by the givenAnglearound thePointspecified by the given x and y coordinates.Rotates thisCurvedPolygoncounter-clockwise (CCW) by the givenAnglearound the centerPointof thisCurvedPolygon.Rotates thisCurvedPolygonclockwise (CW) by the givenAnglearound thePointspecified by the given x and y coordinates.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.toPath()toString()booleantranslate(double dx, double dy) Translates the object by the given values in x and y direction.Translates the object by the givenPoint.
-
Constructor Details
-
CurvedPolygon
Constructs a newCurvedPolygonfrom the givenBezierCurves. SubsequentBezierCurves need to be connected with each other and the closing segment has to be supplied, too, otherwise anIllegalArgumentExceptionis thrown.- Parameters:
curvedSides- theBezierCurves representing the edges of the newCurvedPolygon
-
CurvedPolygon
Constructs a newCurvedPolygonfrom the given list ofBezierCurves. SubsequentBezierCurves need to be connected with each other and the closing segment has to be supplied, too, otherwise anIllegalArgumentExceptionis thrown.- Parameters:
curvedSides- theBezierCurves representing the edges of the newCurvedPolygon- See Also:
-
-
Method Details
-
contains
Description copied from interface:IShape -
contains
Description copied from interface:IGeometry -
equals
-
getBounds
Description copied from interface:IGeometry -
getCenter
Returns an approximated centerPointof thisCurvedPolygon.- Returns:
- an approximated center
Pointof thisCurvedPolygon
-
getCopy
Description copied from interface:IGeometryReturns a new identical copy of thisIGeometry. -
getOutline
Description copied from interface:IShape- Specified by:
getOutlinein interfaceIShape- Returns:
- An
ICurverepresenting thisIShape's outline.
-
getOutlineSegments
Description copied from interface:IShape- Specified by:
getOutlineSegmentsin interfaceIShape- Returns:
- The
ICurvesegments of thisIShape's outline.
-
getRotatedCCW
Description copied from interface:IRotatableRotates the calling object by specifiedAnglecounter-clock-wise (CCW) around its centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCCWin interfaceIRotatable<CurvedPolygon>- Parameters:
angle- rotationAngle- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAnglecounter-clock-wise (CCW) around the specified centerPoint(cx, cy). Does not necessarily return an object of the same type.- Specified by:
getRotatedCCWin interfaceIRotatable<CurvedPolygon>- Parameters:
angle- rotationAnglecx- x-coordinate of the relativePointfor the rotationcy- y-coordinate of the relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAnglecounter-clock-wise (CCW) around the specified centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCCWin interfaceIRotatable<CurvedPolygon>- Parameters:
angle- rotationAnglecenter- relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatableRotates the calling object by specifiedAngleclock-wise (CW) around its centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCWin interfaceIRotatable<CurvedPolygon>- Parameters:
angle- rotationAngle- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAngleclock-wise (CW) around the specified centerPoint(cx, cy). Does not necessarily return an object of the same type.- Specified by:
getRotatedCWin interfaceIRotatable<CurvedPolygon>- Parameters:
angle- rotationAnglecx- x-coordinate of the relativePointfor the rotationcy- y-coordinate of the relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAngleclock-wise (CW) around the specified centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCWin interfaceIRotatable<CurvedPolygon>- Parameters:
angle- rotationAnglecenter- relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factor relative to its centerPoint.- Specified by:
getScaledin interfaceIScalable<CurvedPolygon>- Parameters:
factor- scale-factor- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factors relative to its centerPoint.- Specified by:
getScaledin interfaceIScalable<CurvedPolygon>- Parameters:
fx- x-scale-factorfy- y-scale-factor- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factor relative to the given centerPoint(cx, cy).- Specified by:
getScaledin interfaceIScalable<CurvedPolygon>- Parameters:
factor- scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factors relative to the given centerPoint(cx, cy).- Specified by:
getScaledin interfaceIScalable<CurvedPolygon>- Parameters:
fx- x-scale-factorfy- y-scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factors relative to the given centerPoint.- Specified by:
getScaledin interfaceIScalable<CurvedPolygon>- Parameters:
fx- x-scale-factorfy- y-scale-factorcenter- relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factor relative to the given centerPoint.- Specified by:
getScaledin interfaceIScalable<CurvedPolygon>- Parameters:
factor- scale-factorcenter- relativePointfor the scaling- Returns:
- the new, scaled object
-
getTransformed
Default implementation returning a transformedPathrepresentation of thisIGeometry. Subclasses may override this method to return a more specific representation.- Specified by:
getTransformedin interfaceIGeometry- Specified by:
getTransformedin interfaceIShape- Parameters:
t- TheAffineTransformto be applied- Returns:
- a transformed
Pathrepresentation of thisIGeometry - See Also:
-
getTranslated
Description copied from interface:ITranslatableTranslates a copy of this object by the given values in x and y direction.- Specified by:
getTranslatedin interfaceITranslatable<CurvedPolygon>- Parameters:
dx- x-translationdy- y-translation- Returns:
- a new, translated object
-
getTranslated
Description copied from interface:ITranslatableTranslates a copy of this object by the givenPoint.- Specified by:
getTranslatedin interfaceITranslatable<CurvedPolygon>- Parameters:
d- translationPoint- Returns:
- a new, translated object
-
rotateCCW
Rotates thisCurvedPolygoncounter-clockwise (CCW) by the givenAnglearound the centerPointof thisCurvedPolygon.- Parameters:
angle- the rotationAngle- Returns:
thisfor convenience
-
rotateCCW
Rotates thisCurvedPolygoncounter-clockwise (CCW) by the givenAnglearound thePointspecified by the given x and y coordinates. -
rotateCCW
-
rotateCW
Rotates thisCurvedPolygoncounter-clockwise (CCW) by the givenAnglearound the centerPointof thisCurvedPolygon.- Parameters:
angle- the rotationAngle- Returns:
thisfor convenience
-
rotateCW
Rotates thisCurvedPolygonclockwise (CW) by the givenAnglearound thePointspecified by the given x and y coordinates. -
rotateCW
-
scale
Description copied from interface:IScalableScales the calling object by the given factor relative to its centerPoint.- Specified by:
scalein interfaceIScalable<CurvedPolygon>- Parameters:
factor- scale-factor- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factors relative to the given centerPoint.- Specified by:
scalein interfaceIScalable<CurvedPolygon>- Parameters:
fx- x-scale-factorfy- y-scale-factor- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factor relative to the given centerPoint(cx, cy).- Specified by:
scalein interfaceIScalable<CurvedPolygon>- Parameters:
factor- scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factors relative to the given centerPoint(cx, cy).- Specified by:
scalein interfaceIScalable<CurvedPolygon>- Parameters:
fx- x-scale-factorfy- y-scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factors relative to the given centerPoint.- Specified by:
scalein interfaceIScalable<CurvedPolygon>- Parameters:
fx- x-scale-factorfy- y-scale-factorcenter- relativePointfor the scaling- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factor relative to the given centerPoint.- Specified by:
scalein interfaceIScalable<CurvedPolygon>- Parameters:
factor- scale-factorcenter- relativePointfor the scaling- Returns:
thisfor convenience
-
toPath
Description copied from interface:IGeometry -
toString
-
translate
Description copied from interface:ITranslatableTranslates the object by the given values in x and y direction.- Specified by:
translatein interfaceITranslatable<CurvedPolygon>- Parameters:
dx- x-translationdy- y-translation- Returns:
thisfor convenience
-
translate
Description copied from interface:ITranslatableTranslates the object by the givenPoint.- Specified by:
translatein interfaceITranslatable<CurvedPolygon>- Parameters:
d- translationPoint- Returns:
thisfor convenience
-
clone
Overridden with public visibility as recommended withinCloneable. -
hashCode
public final int hashCode() -
touches
Description copied from interface:IGeometry
-