Package snap.geom

Class ShapeBuilder

java.lang.Object
snap.geom.Shape
snap.geom.ShapeBuilder
Direct Known Subclasses:
Path2D

public abstract class ShapeBuilder extends Shape
This shape subclass provides basic methods for constructing a shape.
  • Constructor Details

    • ShapeBuilder

      public ShapeBuilder()
  • Method Details

    • moveTo

      public abstract void moveTo(double aX, double aY)
      Moveto.
    • lineTo

      public abstract void lineTo(double aX, double aY)
      LineTo.
    • quadTo

      public abstract void quadTo(double cpx, double cpy, double endX, double endY)
      QuadTo.
    • curveTo

      public abstract void curveTo(double cp1x, double cp1y, double cp2x, double cp2y, double endX, double endY)
      CubicTo.
    • close

      public abstract void close()
      Closes the current polygon.
    • getLastPointX

      public abstract double getLastPointX()
      Returns the last point X.
    • getLastPointY

      public abstract double getLastPointY()
      Returns the last point Y.
    • arcTo

      public void arcTo(double cx, double cy, double endX, double endY)
      ArcTo: Adds a Cubic using the corner point as a guide.
    • lineBy

      public void lineBy(double aX, double aY)
      LineTo.
    • hlineTo

      public void hlineTo(double aX)
      Horizontal LineTo.
    • vlineTo

      public void vlineTo(double aY)
      Vertical LineTo.
    • appendShape

      public void appendShape(Shape aShape)
      Appends given shape to this polygon path.
    • appendPathIter

      public void appendPathIter(PathIter aPathIter)
      Appends given PathIter to this polygon path.
    • appendSegment

      public void appendSegment(Segment aSegment)
      Appends a path segment.
    • appendSvgString

      public void appendSvgString(String aStr)
      Appends a path from an SVG path string.
    • quadToFlat

      public void quadToFlat(double cpx, double cpy, double x, double y, double flatDist)
      QuadTo by adding lineTos.
    • curveToFlat

      public void curveToFlat(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y, double flatDist)
      CubicTo by adding lineTos.