Package playn.core

Interface Path


public interface Path
A path object created by Canvas.createPath().
  • Method Summary

    Modifier and Type
    Method
    Description
    bezierTo(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.
    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.
    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

      Path moveTo(float x, float y)
      Moves the position to the given location.
      Returns:
      this path for convenient call chaining.
    • lineTo

      Path lineTo(float x, float y)
      Adds a line to the path, from the current position to the specified target.
      Returns:
      this path for convenient call chaining.
    • quadraticCurveTo

      Path 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.
      Returns:
      this path for convenient call chaining.
    • bezierTo

      Path bezierTo(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.
      Returns:
      this path for convenient call chaining.