Package org.eclipse.gef.fx.utils
Class Geometry2Shape
- java.lang.Object
-
- org.eclipse.gef.fx.utils.Geometry2Shape
-
public class Geometry2Shape extends java.lang.ObjectThe utility classGeometry2Shapeprovides methods for the conversion ofIGeometryimplementations to JavaFXShapeimplementations.
-
-
Constructor Summary
Constructors Constructor Description Geometry2Shape()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javafx.scene.shape.ArctoArc(Arc arc)Returns aArcthat visualizes the givenArc.static javafx.scene.shape.CubicCurvetoCubicCurve(CubicCurve cubic)Returns aCubicCurvethat visualizes the givenCubicCurve.static javafx.scene.shape.EllipsetoEllipse(Ellipse ellipse)Returns aEllipsethat visualizes the givenEllipse.static javafx.scene.shape.LinetoLine(Line line)Returns aLinethat visualizes the givenLine.static javafx.scene.shape.PathtoPath(Path path)Converts the givenPathto a JavaFXPath.static javafx.scene.shape.PathElement[]toPathElements(Path path)Converts the givenPathto an array of JavaFXPathElements.static javafx.scene.shape.PolygontoPolygon(Polygon polygon)Returns 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.ShapetoShape(IGeometry geometry)Creates aShapethat visualizes the passed-inIGeometry.
-
-
-
Method Detail
-
toArc
public static javafx.scene.shape.Arc toArc(Arc arc)
Returns aArcthat visualizes the givenArc.
-
toCubicCurve
public static javafx.scene.shape.CubicCurve toCubicCurve(CubicCurve cubic)
Returns aCubicCurvethat visualizes the givenCubicCurve.- Parameters:
cubic- TheCubicCurvefrom which aCubicCurveis constructed.- Returns:
- A newly created
CubicCurvethat visualizes the givenCubicCurve.
-
toEllipse
public static javafx.scene.shape.Ellipse toEllipse(Ellipse ellipse)
Returns aEllipsethat visualizes the givenEllipse.
-
toLine
public static javafx.scene.shape.Line toLine(Line line)
Returns aLinethat visualizes the givenLine.
-
toPath
public static javafx.scene.shape.Path toPath(Path path)
Converts the givenPathto a JavaFXPath.- Parameters:
path- ThePathto convert.- Returns:
- The new JavaFX
Path.
-
toPathElements
public static javafx.scene.shape.PathElement[] toPathElements(Path path)
Converts the givenPathto an array of JavaFXPathElements.- Parameters:
path- ThePathto convert.- Returns:
- The new array of
PathElements.
-
toPolygon
public static javafx.scene.shape.Polygon toPolygon(Polygon polygon)
Returns aPolygonthat visualizes the givenPolygon.
-
toPolyline
public static javafx.scene.shape.Polyline toPolyline(Polyline polyline)
Returns aPolylinethat visualizes the givenPolyline.
-
toQuadCurve
public static javafx.scene.shape.QuadCurve toQuadCurve(QuadraticCurve quadCurve)
Returns aQuadCurvethat visualizes the givenQuadraticCurve.- Parameters:
quadCurve- TheQuadraticCurvefrom which aQuadCurveis constructed.- Returns:
- A newly created
QuadCurvethat visualizes the givenQuadraticCurve.
-
toRectangle
public static javafx.scene.shape.Rectangle toRectangle(Rectangle rect)
Returns aRectanglethat visualizes the givenRectangle.
-
toRectangle
public static javafx.scene.shape.Rectangle toRectangle(RoundedRectangle roundedRect)
Returns aRectanglethat visualizes the givenRoundedRectangle.- Parameters:
roundedRect- TheRoundedRectanglefrom which aRectangleis constructed.- Returns:
- A newly created
Rectanglethat visualizes the givenRoundedRectangle.
-
-