Path class represents a simple shape
and provides facilities required for basic construction
and management of a geometric path. Example:
import javafx.scene.shape.*; Path path = new Path(); MoveTo moveTo = new MoveTo(); moveTo.setX(0.0f); moveTo.setY(0.0f); HLineTo hLineTo = new HLineTo(); hLineTo.setX(70.0f); QuadCurveTo quadCurveTo = new QuadCurveTo(); quadCurveTo.setX(120.0f); quadCurveTo.setY(60.0f); quadCurveTo.setControlX(100.0f); quadCurveTo.setControlY(0.0f); LineTo lineTo = new LineTo(); lineTo.setX(175.0f); lineTo.setY(55.0f); ArcTo arcTo = new ArcTo(); arcTo.setX(50.0f); arcTo.setY(50.0f); arcTo.setRadiusX(50.0f); arcTo.setRadiusY(50.0f); path.getElements().add(moveTo); path.getElements().add(hLineTo); path.getElements().add(quadCurveTo); path.getElements().add(lineTo); path.getElements().add(arcTo);
| Modifier and Type | Field and Description |
|---|---|
| private final ObservableList | elements
Defines the array of path elements of this path. |
| private ObjectProperty | fillRule
Defines the filling rule constant for determining the interior of the path. |
| private boolean | |
| private Path2D |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Path(Collection<? extends PathElement>
The collection of the elements of the Path elements)Creates new instance of Path |
| Modifier and Type | Method and Description |
|---|---|
| private Bounds | |
| private Path2D | |
| private NGNode | |
| private Paint | |
| private Paint | |
| private void | |
| public final ObjectProperty | |
| public final ObservableList | |
| public final FillRule | |
| private boolean | |
| pack-priv void | |
| public final void | |
| public String | Returns: a string representation of thisPath object.Overrides javafx. Returns a string representation of this |
| elements | back to summary |
|---|---|
| private final ObservableList<PathElement> elements Defines the array of path elements of this path.
| |
| fillRule | back to summary |
|---|---|
| private ObjectProperty<FillRule> fillRule Defines the filling rule constant for determining the interior of the path.
The value must be one of the following constants:
| |
| isPathValid | back to summary |
|---|---|
| private boolean isPathValid | |
| path2d | back to summary |
|---|---|
| private Path2D path2d | |
| Path | back to summary |
|---|---|
| public Path() Creates an empty instance of Path. | |
| Path | back to summary |
|---|---|
| public Path(PathElement... elements) Creates a new instance of Path
| |
| Path | back to summary |
|---|---|
| public Path(Collection<? extends PathElement> elements) Creates new instance of Path
| |
| doComputeLayoutBounds | back to summary |
|---|---|
| private Bounds doComputeLayoutBounds() | |
| doConfigShape | back to summary |
|---|---|
| private Path2D doConfigShape() | |
| doCreatePeer | back to summary |
|---|---|
| private NGNode doCreatePeer() | |
| doCssGetFillInitialValue | back to summary |
|---|---|
| private Paint doCssGetFillInitialValue() | |
| doCssGetStrokeInitialValue | back to summary |
|---|---|
| private Paint doCssGetStrokeInitialValue() | |
| doUpdatePeer | back to summary |
|---|---|
| private void doUpdatePeer() | |
| fillRuleProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| getElements | back to summary |
|---|---|
| public final ObservableList Gets observable list of path elements of this path.
| |
| getFillRule | back to summary |
|---|---|
| public final FillRule getFillRule() | |
| isFirstPathElementValid | back to summary |
|---|---|
| private boolean isFirstPathElementValid() | |
| markPathDirty | back to summary |
|---|---|
| pack-priv void markPathDirty() | |
| setFillRule | back to summary |
|---|---|
| public final void setFillRule(FillRule value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides javafx. Returns a string representation of this | |