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
-
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.scene.shape.Arc
Returns aArc
that visualizes the givenArc
.static javafx.scene.shape.CubicCurve
toCubicCurve
(CubicCurve cubic) Returns aCubicCurve
that visualizes the givenCubicCurve
.static javafx.scene.shape.Ellipse
Returns aEllipse
that visualizes the givenEllipse
.static javafx.scene.shape.Line
Returns aLine
that visualizes the givenLine
.static javafx.scene.shape.Path
Converts the givenPath
to a JavaFXPath
.static javafx.scene.shape.PathElement[]
toPathElements
(Path path) Converts the givenPath
to an array of JavaFXPathElement
s.static javafx.scene.shape.Polygon
Returns aPolygon
that visualizes the givenPolygon
.static javafx.scene.shape.Polyline
toPolyline
(Polyline polyline) Returns aPolyline
that visualizes the givenPolyline
.static javafx.scene.shape.QuadCurve
toQuadCurve
(QuadraticCurve quadCurve) Returns aQuadCurve
that visualizes the givenQuadraticCurve
.static javafx.scene.shape.Rectangle
toRectangle
(Rectangle rect) Returns aRectangle
that visualizes the givenRectangle
.static javafx.scene.shape.Rectangle
toRectangle
(RoundedRectangle roundedRect) Returns aRectangle
that visualizes the givenRoundedRectangle
.static javafx.scene.shape.Shape
Creates aShape
that visualizes the passed-inIGeometry
.
-
Constructor Details
-
Geometry2Shape
public Geometry2Shape()
-
-
Method Details
-
toArc
Returns aArc
that visualizes the givenArc
. -
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
Returns aEllipse
that visualizes the givenEllipse
. -
toLine
Returns aLine
that visualizes the givenLine
. -
toPath
Converts the givenPath
to a JavaFXPath
.- Parameters:
path
- ThePath
to convert.- Returns:
- The new JavaFX
Path
.
-
toPathElements
Converts the givenPath
to an array of JavaFXPathElement
s.- Parameters:
path
- ThePath
to convert.- Returns:
- The new array of
PathElement
s.
-
toPolygon
Returns aPolygon
that visualizes the givenPolygon
. -
toPolyline
Returns aPolyline
that visualizes the givenPolyline
. -
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
Returns aRectangle
that visualizes the givenRectangle
. -
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
Creates aShape
that visualizes the passed-inIGeometry
.
-