moveTo
moveTo: (Path2D, number, number) -> ()Start a subpath at x, y.
Path2D.new()| Method | Returns | Description |
|---|---|---|
moveTo(number, number) | () | Start a subpath at x, y. |
lineTo(number, number) | () | A line to x, y; an error with no moveTo first. |
quadTo(number, number, number, number) | () | A quadratic curve through control point 1 to point 2. |
curveTo(number, number, number, number, number, number) | () | A cubic curve through two control points to point 3. |
closePath() | () | Close the subpath. |
reset() | () | Empty the path. |
new() | Path2D | An empty non-zero path (Path2D.Double.new() reaches it too). |
| Field | Type | Description |
|---|---|---|
Double | Path2DClass | Path2D.Double: Path2D itself, so Path2D.Double.new(...) is Path2D.new(...). |
Float | Path2DClass | Path2D.Float: Path2D itself, so Path2D.Float.new(...) is Path2D.new(...). |
| Method | Returns | Description |
|---|---|---|
Path2DClass.new | Path2D | An empty non-zero path (Path2D.Double.new() reaches it too). |
moveTomoveTo: (Path2D, number, number) -> ()Start a subpath at x, y.
lineTolineTo: (Path2D, number, number) -> ()A line to x, y; an error with no moveTo first.
quadToquadTo: (Path2D, number, number, number, number) -> ()A quadratic curve through control point 1 to point 2.
curveTocurveTo: (Path2D, number, number, number, number, number, number) -> ()A cubic curve through two control points to point 3.
closePathclosePath: (Path2D) -> ()Close the subpath.
resetreset: (Path2D) -> ()Empty the path.
newnew: () -> Path2DAn empty non-zero path (Path2D.Double.new() reaches it too).