Class Path2F.Iterator

  • Enclosing class:

    public static final class Path2F.Iterator
    extends Object
    • Constructor Detail

      • Iterator

        public Iterator​(Path2F path,
                        AffineTransform at)
        Constructs a new GeneralPath.Iterator for given general path and transformation
        path - - the source GeneralPath object
        at - - the AffineTransform object to apply rectangle path
    • Method Detail

      • getWinding

        public Winding getWinding()
        Compute the general winding of the vertices
        CCW or CW Winding
      • points

        public float[] points()
        Returns reference of the point array covering the whole iteration of Path2D, use index() to access the current point.
      • index

        public int index()
        Return the points() index for the current segment.
      • currentSegment

        public Path2F.SegmentType currentSegment​(float[] coords)
        try to use index(), points() and next() to avoid copying
        Return the current segment type and copies the current segment's points to given storage
        coords - storage for current segment's points
        current segment type
        See Also:
        points(), #type_index(), getType()
      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements.
      • next

        public Path2F.SegmentType next()
        Returns the current segment type in the iteration, then moving to the next path segment.