public class Path extends Object
Constructor and Description |
---|
Path() |
Path(List extends Subpath> subpaths) |
Modifier and Type | Method and Description |
---|---|
void |
addSubpath(Subpath subpath)
Adds the subpath to this path.
|
void |
addSubpaths(List extends Subpath> subpaths)
Adds the subpaths to this path.
|
void |
closeAllSubpaths()
Closes all subpathes contained in this path.
|
void |
closeSubpath()
Closes the current subpath.
|
void |
curveFromTo(float x1, float y1, float x3, float y3)
Appends a cubic Bezier curve to the current path.
|
void |
curveTo(float x2, float y2, float x3, float y3)
Appends a cubic Bezier curve to the current path.
|
void |
curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
Appends a cubic Bezier curve to the current path.
|
Point2D |
getCurrentPoint()
The current point is the trailing endpoint of the segment most recently added to the current path.
|
List<Subpath> |
getSubpaths() |
boolean |
isEmpty()
Path is empty if it contains no subpaths.
|
void |
lineTo(float x, float y)
Appends a straight line segment from the current point to the point (x, y) .
|
void |
moveTo(float x, float y)
Begins a new subpath by moving the current point to coordinates (x, y) .
|
void |
rectangle(float x, float y, float w, float h)
Appends a rectangle to the current path as a complete subpath.
|
List<Integer> |
replaceCloseWithLine()
Adds additional line to each closed subpath and makes the subpath unclosed.
|
public void addSubpath(Subpath subpath)
subpath
- The subpath to be added to this path.
public void addSubpaths(List extends Subpath> subpaths)
subpaths
- List
of subpaths to be added to this path.
public Point2D getCurrentPoint()
public void moveTo(float x, float y)
(x, y)
.
public void lineTo(float x, float y)
(x, y)
.
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
(x3, y3)
.
public void curveTo(float x2, float y2, float x3, float y3)
(x3, y3)
with the note that the current point represents two control points.
public void curveFromTo(float x1, float y1, float x3, float y3)
(x3, y3)
with the note that the (x3, y3) point represents two control points.
public void rectangle(float x, float y, float w, float h)
public void closeSubpath()
public void closeAllSubpaths()
public List<Integer> replaceCloseWithLine()
public boolean isEmpty()
Copyright © 1998–2019. All rights reserved.