Package org.eclipse.gef.fx.utils
Class Geometry2Shape
java.lang.Object
org.eclipse.gef.fx.utils.Geometry2Shape
The utility class
Geometry2Shape
provides methods for the conversion
of IGeometry
implementations to JavaFX Shape
implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Arc
static CubicCurve
toCubicCurve
(CubicCurve cubic) Returns aCubicCurve
that visualizes the givenCubicCurve
.static Ellipse
static Line
static Path
static PathElement[]
toPathElements
(Path path) Converts the givenPath
to an array of JavaFXPathElement
s.static Polygon
static Polyline
toPolyline
(Polyline polyline) static QuadCurve
toQuadCurve
(QuadraticCurve quadCurve) Returns aQuadCurve
that visualizes the givenQuadraticCurve
.static Rectangle
toRectangle
(Rectangle rect) static Rectangle
toRectangle
(RoundedRectangle roundedRect) Returns aRectangle
that visualizes the givenRoundedRectangle
.static Shape
-
Constructor Details
-
Geometry2Shape
public Geometry2Shape()
-
-
Method Details
-
toArc
-
toCubicCurve
Returns aCubicCurve
that visualizes the givenCubicCurve
.- Parameters:
cubic
- TheCubicCurve
from which aCubicCurve
is constructed.- Returns:
- A newly created
CubicCurve
that visualizes the givenCubicCurve
.
-
toEllipse
-
toLine
-
toPath
-
toPathElements
Converts the givenPath
to an array of JavaFXPathElement
s.- Parameters:
path
- ThePath
to convert.- Returns:
- The new array of
PathElement
s.
-
toPolygon
-
toPolyline
-
toQuadCurve
Returns aQuadCurve
that visualizes the givenQuadraticCurve
.- Parameters:
quadCurve
- TheQuadraticCurve
from which aQuadCurve
is constructed.- Returns:
- A newly created
QuadCurve
that visualizes the givenQuadraticCurve
.
-
toRectangle
-
toRectangle
Returns aRectangle
that visualizes the givenRoundedRectangle
.- Parameters:
roundedRect
- TheRoundedRectangle
from which aRectangle
is constructed.- Returns:
- A newly created
Rectangle
that visualizes the givenRoundedRectangle
.
-
toShape
-