For more information on path elements see the Path and
PathElement classes.
Example:
import javafx.scene.shape.*; Path path = new Path(); MoveTo moveTo = new MoveTo(); moveTo.setX(0.0); moveTo.setY(0.0); ArcTo arcTo = new ArcTo(); arcTo.setX(50.0); arcTo.setY(50.0); arcTo.setRadiusX(50.0); arcTo.setRadiusY(50.0); path.getElements().add(moveTo); path.getElements().add(arcTo);
Following image demonstrates radiusX, radiusY and
xAxisRotation parameters:
radiusX is the horizontal radius of the full ellipse of which this arc is
a partial section, radiusY is its vertical radius.
xAxisRotation defines the rotation of the ellipse in degrees.
In most cases, there are four options of how to draw an arc from
starting point to given end coordinates. They can be distinguished by
largeArcFlag and sweepFlag parameters.
largeArcFlag == true means that the arc greater than 180 degrees will
be drawn. sweepFlag == true means that the arc will be drawn
in the positive angle direction - i.e. the angle in the
ellipse formula will increase from [fromX, fromY] to [x,y].
Following images demonstrate this behavior:
| Modifier and Type | Field and Description |
|---|---|
| private BooleanProperty | largeArcFlag
The large arc flag. |
| private DoubleProperty | radiusX
The horizontal radius to use for the arc. |
| private DoubleProperty | radiusY
The vertical radius to use for the arc. |
| private BooleanProperty | sweepFlag
The sweep flag |
| private DoubleProperty | x
The x coordinate to arc to. |
| private DoubleProperty | xAxisRotation
The x-axis rotation in degrees. |
| private DoubleProperty | y
The y coordinate to arc to. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ArcTo(double
horizontal radius of the arc radiusX, double vertical radius of the arc radiusY, double the x-axis rotation in degrees xAxisRotation, double horizontal position of the arc end point x, double vertical position of the arc end point y, boolean large arg flag: determines which arc to use (large/small) largeArcFlag, boolean sweep flag: determines which arc to use (direction) sweepFlag)Creates a new instance of ArcTo. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| pack-priv void | |
| private void | |
| public final double | |
| public final double | |
| public final double | |
| public final double | |
| public final double | |
| public final boolean | |
| public final boolean | |
| public final BooleanProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final BooleanProperty | |
| public String | Returns: a string representation of thisArcTo object.Overrides java. Returns a string representation of this |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty |
| largeArcFlag | back to summary |
|---|---|
| private BooleanProperty largeArcFlag The large arc flag.
| |
| radiusX | back to summary |
|---|---|
| private DoubleProperty radiusX The horizontal radius to use for the arc.
| |
| radiusY | back to summary |
|---|---|
| private DoubleProperty radiusY The vertical radius to use for the arc.
| |
| sweepFlag | back to summary |
|---|---|
| private BooleanProperty sweepFlag The sweep flag
| |
| x | back to summary |
|---|---|
| private DoubleProperty x The x coordinate to arc to.
| |
| xAxisRotation | back to summary |
|---|---|
| private DoubleProperty xAxisRotation The x-axis rotation in degrees.
| |
| y | back to summary |
|---|---|
| private DoubleProperty y The y coordinate to arc to.
| |
| ArcTo | back to summary |
|---|---|
| public ArcTo() Creates an empty instance of ArcTo. | |
| ArcTo | back to summary |
|---|---|
| public ArcTo(double radiusX, double radiusY, double xAxisRotation, double x, double y, boolean largeArcFlag, boolean sweepFlag) Creates a new instance of ArcTo.
| |
| addArcTo | back to summary |
|---|---|
| private void addArcTo(NGPath pgPath, Path2D path, final double x0, final double y0) | |
| addTo | back to summary |
|---|---|
| pack-priv void addTo(NGPath pgPath) Implements abstract javafx.
| |
| doAddTo | back to summary |
|---|---|
| private void doAddTo(Path2D path) | |
| getRadiusX | back to summary |
|---|---|
| public final double getRadiusX() | |
| getRadiusY | back to summary |
|---|---|
| public final double getRadiusY() | |
| getX | back to summary |
|---|---|
| public final double getX() | |
| getXAxisRotation | back to summary |
|---|---|
| public final double getXAxisRotation() Gets the x-axis rotation in degrees.
| |
| getY | back to summary |
|---|---|
| public final double getY() | |
| isLargeArcFlag | back to summary |
|---|---|
| public final boolean isLargeArcFlag() | |
| isSweepFlag | back to summary |
|---|---|
| public final boolean isSweepFlag() | |
| largeArcFlagProperty | back to summary |
|---|---|
| public final BooleanProperty largeArcFlagProperty() | |
| radiusXProperty | back to summary |
|---|---|
| public final DoubleProperty radiusXProperty() | |
| radiusYProperty | back to summary |
|---|---|
| public final DoubleProperty radiusYProperty() | |
| setLargeArcFlag | back to summary |
|---|---|
| public final void setLargeArcFlag(boolean value) | |
| setRadiusX | back to summary |
|---|---|
| public final void setRadiusX(double value) | |
| setRadiusY | back to summary |
|---|---|
| public final void setRadiusY(double value) | |
| setSweepFlag | back to summary |
|---|---|
| public final void setSweepFlag(boolean value) | |
| setX | back to summary |
|---|---|
| public final void setX(double value) | |
| setXAxisRotation | back to summary |
|---|---|
| public final void setXAxisRotation(double value) Sets the x-axis rotation in degrees.
| |
| setY | back to summary |
|---|---|
| public final void setY(double value) | |
| sweepFlagProperty | back to summary |
|---|---|
| public final BooleanProperty sweepFlagProperty() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| XAxisRotationProperty | back to summary |
|---|---|
| public final DoubleProperty XAxisRotationProperty() The x-axis rotation in degrees.
| |
| xProperty | back to summary |
|---|---|
| public final DoubleProperty xProperty() | |
| yProperty | back to summary |
|---|---|
| public final DoubleProperty yProperty() | |