public class Shape2Geometry
extends java.lang.Object
Shape2Geometry provides methods for the conversion
of JavaFX Shape implementations to IGeometry implementations.| Constructor and Description |
|---|
Shape2Geometry() |
| Modifier and Type | Method and Description |
|---|---|
static Arc |
toArc(javafx.scene.shape.Arc arc)
Converts the given JavaFX
Arc to a
Arc. |
static CubicCurve |
toCubicCurve(javafx.scene.shape.CubicCurve cubic)
Converts the given JavaFX
CubicCurve to a
CubicCurve. |
static Ellipse |
toEllipse(javafx.scene.shape.Circle circle)
Converts the given JavaFX
Circle to a
Ellipse. |
static Ellipse |
toEllipse(javafx.scene.shape.Ellipse ellipse)
Converts the given JavaFX
Ellipse to a
Ellipse. |
static IGeometry |
toGeometry(javafx.scene.shape.Shape visual)
Returns an
IGeometry that describes the geometric outline of the
passed-in Shape. |
static Line |
toLine(javafx.scene.shape.Line line)
Converts the given JavaFX
Line to a
Line. |
static Path |
toPath(javafx.scene.shape.Path path)
Converts the given JavaFX
Path to a
Path. |
static Polygon |
toPolygon(javafx.scene.shape.Polygon polygon)
Converts the given JavaFX
Polygon to a
Polygon. |
static Polyline |
toPolyline(javafx.scene.shape.Polyline polyline)
Converts the given JavaFX
Polyline to a
Polyline. |
static QuadraticCurve |
toQuadraticCurve(javafx.scene.shape.QuadCurve quad)
Converts the given JavaFX
QuadCurve to a
QuadraticCurve. |
static Rectangle |
toRectangle(javafx.scene.shape.Rectangle rect)
Converts the given JavaFX
Rectangle to a
Rectangle. |
static RoundedRectangle |
toRoundedRectangle(javafx.scene.shape.Rectangle rect)
Converts the given JavaFX
Rectangle to a
RoundedRectangle. |
public static Arc toArc(javafx.scene.shape.Arc arc)
Arc to a
Arc.arc - The JavaFX Arc to convert.Arc
that describes the given Arc.public static CubicCurve toCubicCurve(javafx.scene.shape.CubicCurve cubic)
CubicCurve to a
CubicCurve.cubic - The JavaFX CubicCurve to convert.CubicCurve that
describes the given CubicCurve.public static Ellipse toEllipse(javafx.scene.shape.Circle circle)
Circle to a
Ellipse.circle - The JavaFX Circle to convert.Ellipse that describes
the given Circle.public static Ellipse toEllipse(javafx.scene.shape.Ellipse ellipse)
Ellipse to a
Ellipse.ellipse - The JavaFX Ellipse to convert.Ellipse that describes
the given Ellipse.public static IGeometry toGeometry(javafx.scene.shape.Shape visual)
IGeometry that describes the geometric outline of the
passed-in Shape. The conversion is supported for the following
Shapes:
Arc
Circle
CubicCurve
Ellipse
Line
Path
Polygon
Polyline
QuadCurve
Rectangle
Shapes cannot be converted, yet:
Text
SVGPath
public static Line toLine(javafx.scene.shape.Line line)
Line to a
Line.line - The JavaFX Line to convert.Line
that describes the given Line.public static final Path toPath(javafx.scene.shape.Path path)
Path to a
Path.path - The JavaFX Path to convert.Path
that describes the given Path.public static Polygon toPolygon(javafx.scene.shape.Polygon polygon)
Polygon to a
Polygon.polygon - The JavaFX Polygon to convert.Polygon that describes
the given Polygon.public static Polyline toPolyline(javafx.scene.shape.Polyline polyline)
Polyline to a
Polyline.polyline - The JavaFX Polyline to convert.Polyline that describes
the given Polyline.public static QuadraticCurve toQuadraticCurve(javafx.scene.shape.QuadCurve quad)
QuadCurve to a
QuadraticCurve.quad - The JavaFX QuadCurve to convert.QuadraticCurve that
describes the given QuadCurve.public static Rectangle toRectangle(javafx.scene.shape.Rectangle rect)
Rectangle to a
Rectangle. Note, that the
arc-width and arc-height of the given Rectangle will not be
preserved in the resulting geometry.rect - The JavaFX Rectangle to convert.Rectangle that describes
the given Rectangle (without its arc-width and
arc-height).public static RoundedRectangle toRoundedRectangle(javafx.scene.shape.Rectangle rect)
Rectangle to a
RoundedRectangle.rect - The JavaFX Rectangle to convert.RoundedRectangle that
describes the given Rectangle.Copyright (c) 2014 itemis AG and others. All rights reserved.