Interface IPath


public interface IPath
The path interface, for building a path as described in the SVG specifications.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Lists the path operation types.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    arcTo(float rx, float ry, float phi, boolean fA, boolean fS, float x, float y)
    Draws an elliptical arc from the current point to (x, y).
    void
    Close the current subpath by drawing a straight line from the current point to current subpath's initial point.
    void
    curveTo(float x1, float y1, float x2, float y2, float x, float y)
    Draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve.
    void
    lineTo(float x, float y)
    Draws a line from the current point to the given (x,y) coordinate which becomes the new current point.
    void
    moveTo(float x, float y)
    Starts a new subpath at the given (x,y) coordinate.
    void
    quadTo(float x1, float y1, float x, float y)
    Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point.
    Lists the operations not supported by the implementation of IPath.
  • Method Details

    • unsupportedOperations

      @NotNull @NotNull EnumSet<IPath.OperationType> unsupportedOperations()
      Lists the operations not supported by the implementation of IPath.
      Returns:
      a list of unsupported operations.
    • moveTo

      void moveTo(float x, float y)
      Starts a new subpath at the given (x,y) coordinate.
      Parameters:
      x - the x coordinate to move to.
      y - the y coordinate to move to.
      See Also:
    • lineTo

      void lineTo(float x, float y)
      Draws a line from the current point to the given (x,y) coordinate which becomes the new current point.
      Parameters:
      x - the x coordinate to draw a line to.
      y - the y coordinate to draw a line to.
      See Also:
    • curveTo

      void curveTo(float x1, float y1, float x2, float y2, float x, float y)
      Draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve.
      Parameters:
      x1 - the x coordinate of the control point at the beginning of the curve.
      y1 - the y coordinate of the control point at the beginning of the curve.
      x2 - the x coordinate of the control point at the end of the curve.
      y2 - the y coordinate of the control point at the end of the curve.
      x - the x coordinate of the final point of the curve.
      y - the y coordinate of the final point of the curve.
      See Also:
    • quadTo

      void quadTo(float x1, float y1, float x, float y)
      Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point.
      Parameters:
      x1 - the x coordinate of the control point.
      y1 - the y coordinate of the control point.
      x - the x coordinate of the final point of the curve.
      y - the y coordinate of the final point of the curve.
      See Also:
    • arcTo

      void arcTo(float rx, float ry, float phi, boolean fA, boolean fS, float x, float y)
      Draws an elliptical arc from the current point to (x, y). The size and orientation of the ellipse are defined by two radii (rx, ry) and an x-axis-rotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automatically to satisfy the constraints imposed by the other parameters.
      Parameters:
      rx - the x-axis radius (must be positive).
      ry - the y-axis radius (must be positive).
      phi - the x-axis rotation angle.
      fA - the large-arc flag.
      fS - the sweep-arc flag.
      x - the x coordinate of the last point.
      y - the y coordinate of the last point.
      See Also:
    • closePath

      void closePath()
      Close the current subpath by drawing a straight line from the current point to current subpath's initial point.
      See Also: