Class PathLength.SingleSegmentPathIterator

java.lang.Object
org.apache.batik.ext.awt.geom.PathLength.SingleSegmentPathIterator
All Implemented Interfaces:
PathIterator
Enclosing class:
PathLength

protected static class PathLength.SingleSegmentPathIterator extends Object implements PathIterator
A PathIterator that returns only the next path segment from another PathIterator.
  • Field Details

    • it

      protected PathIterator it
      The path iterator being wrapped.
    • done

      protected boolean done
      Whether the single segment has been passed.
    • moveDone

      protected boolean moveDone
      Whether the generated move command has been returned.
    • x

      protected double x
      The x coordinate of the next move command.
    • y

      protected double y
      The y coordinate of the next move command.
  • Constructor Details

    • SingleSegmentPathIterator

      protected SingleSegmentPathIterator()
  • Method Details

    • setPathIterator

      public void setPathIterator(PathIterator it, double x, double y)
      Sets the path iterator to use and the initial SEG_MOVETO command to return before it.
    • currentSegment

      public int currentSegment(double[] coords)
      Specified by:
      currentSegment in interface PathIterator
    • currentSegment

      public int currentSegment(float[] coords)
      Specified by:
      currentSegment in interface PathIterator
    • getWindingRule

      public int getWindingRule()
      Specified by:
      getWindingRule in interface PathIterator
    • isDone

      public boolean isDone()
      Specified by:
      isDone in interface PathIterator
    • next

      public void next()
      Specified by:
      next in interface PathIterator