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 javafx.scene.shape.ArcReturns aArcthat visualizes the givenArc.static javafx.scene.shape.CubicCurvetoCubicCurve(CubicCurve cubic) Returns aCubicCurvethat visualizes the givenCubicCurve.static javafx.scene.shape.EllipseReturns aEllipsethat visualizes the givenEllipse.static javafx.scene.shape.LineReturns aLinethat visualizes the givenLine.static javafx.scene.shape.PathConverts the givenPathto a JavaFXPath.static javafx.scene.shape.PathElement[]toPathElements(Path path) Converts the givenPathto an array of JavaFXPathElements.static javafx.scene.shape.PolygonReturns aPolygonthat visualizes the givenPolygon.static javafx.scene.shape.PolylinetoPolyline(Polyline polyline) Returns aPolylinethat visualizes the givenPolyline.static javafx.scene.shape.QuadCurvetoQuadCurve(QuadraticCurve quadCurve) Returns aQuadCurvethat visualizes the givenQuadraticCurve.static javafx.scene.shape.RectangletoRectangle(Rectangle rect) Returns aRectanglethat visualizes the givenRectangle.static javafx.scene.shape.RectangletoRectangle(RoundedRectangle roundedRect) Returns aRectanglethat visualizes the givenRoundedRectangle.static javafx.scene.shape.ShapeCreates aShapethat visualizes the passed-inIGeometry.
-
Constructor Details
-
Geometry2Shape
public Geometry2Shape()
-
-
Method Details
-
toArc
Returns aArcthat visualizes the givenArc. -
toCubicCurve
Returns aCubicCurvethat visualizes the givenCubicCurve.- Parameters:
cubic- TheCubicCurvefrom which aCubicCurveis constructed.- Returns:
- A newly created
CubicCurvethat visualizes the givenCubicCurve.
-
toEllipse
Returns aEllipsethat visualizes the givenEllipse. -
toLine
Returns aLinethat visualizes the givenLine. -
toPath
Converts the givenPathto a JavaFXPath.- Parameters:
path- ThePathto convert.- Returns:
- The new JavaFX
Path.
-
toPathElements
Converts the givenPathto an array of JavaFXPathElements.- Parameters:
path- ThePathto convert.- Returns:
- The new array of
PathElements.
-
toPolygon
Returns aPolygonthat visualizes the givenPolygon. -
toPolyline
Returns aPolylinethat visualizes the givenPolyline. -
toQuadCurve
Returns aQuadCurvethat visualizes the givenQuadraticCurve.- Parameters:
quadCurve- TheQuadraticCurvefrom which aQuadCurveis constructed.- Returns:
- A newly created
QuadCurvethat visualizes the givenQuadraticCurve.
-
toRectangle
Returns aRectanglethat visualizes the givenRectangle. -
toRectangle
Returns aRectanglethat visualizes the givenRoundedRectangle.- Parameters:
roundedRect- TheRoundedRectanglefrom which aRectangleis constructed.- Returns:
- A newly created
Rectanglethat visualizes the givenRoundedRectangle.
-
toShape
Creates aShapethat visualizes the passed-inIGeometry.
-