Package playn.core
Interface Path
public interface Path
A path object created by
Canvas.createPath()
.-
Method Summary
Modifier and TypeMethodDescriptionbezierTo
(float c1x, float c1y, float c2x, float c2y, float x, float y) Adds a bezier curve to the path, from the current position to the specified target, using the supplied control points.close()
Closes the path, returning the position to the beginning of the first stroke.lineTo
(float x, float y) Adds a line to the path, from the current position to the specified target.moveTo
(float x, float y) Moves the position to the given location.quadraticCurveTo
(float cpx, float cpy, float x, float y) Adds a quadratic curve to the path, from the current position to the specified target, with the specified control point.reset()
Resets the current path, removing all strokes and moving the position to (0, 0).
-
Method Details
-
reset
Path reset()Resets the current path, removing all strokes and moving the position to (0, 0).- Returns:
- this path for convenient call chaining.
-
close
Path close()Closes the path, returning the position to the beginning of the first stroke.- Returns:
- this path for convenient call chaining.
-
moveTo
Moves the position to the given location.- Returns:
- this path for convenient call chaining.
-
lineTo
Adds a line to the path, from the current position to the specified target.- Returns:
- this path for convenient call chaining.
-
quadraticCurveTo
Adds a quadratic curve to the path, from the current position to the specified target, with the specified control point.- Returns:
- this path for convenient call chaining.
-
bezierTo
Adds a bezier curve to the path, from the current position to the specified target, using the supplied control points.- Returns:
- this path for convenient call chaining.
-