Package org.eclipse.gef.fx.utils
Class Shape2Geometry
java.lang.Object
org.eclipse.gef.fx.utils.Shape2Geometry
The utility class
Shape2Geometry
provides methods for the conversion
of JavaFX Shape
implementations to IGeometry
implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Arc
static CubicCurve
toCubicCurve
(CubicCurve cubic) Converts the given JavaFXCubicCurve
to aCubicCurve
.static Ellipse
static Ellipse
static IGeometry
toGeometry
(Shape visual) static Line
static final Path
static Polygon
static Polyline
toPolyline
(Polyline polyline) static QuadraticCurve
toQuadraticCurve
(QuadCurve quad) Converts the given JavaFXQuadCurve
to aQuadraticCurve
.static Rectangle
toRectangle
(Rectangle rect) static RoundedRectangle
toRoundedRectangle
(Rectangle rect) Converts the given JavaFXRectangle
to aRoundedRectangle
.
-
Constructor Details
-
Shape2Geometry
public Shape2Geometry()
-
-
Method Details
-
toArc
-
toCubicCurve
Converts the given JavaFXCubicCurve
to aCubicCurve
.- Parameters:
cubic
- The JavaFXCubicCurve
to convert.- Returns:
- The newly created
CubicCurve
that describes the givenCubicCurve
.
-
toEllipse
-
toEllipse
-
toGeometry
-
toLine
-
toPath
-
toPolygon
-
toPolyline
-
toQuadraticCurve
Converts the given JavaFXQuadCurve
to aQuadraticCurve
.- Parameters:
quad
- The JavaFXQuadCurve
to convert.- Returns:
- The newly created
QuadraticCurve
that describes the givenQuadCurve
.
-
toRectangle
-
toRoundedRectangle
Converts the given JavaFXRectangle
to aRoundedRectangle
.- Parameters:
rect
- The JavaFXRectangle
to convert.- Returns:
- The newly created
RoundedRectangle
that describes the givenRectangle
.
-