Class Path2F.Iterator

  • Enclosing class:
    Path2F

    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
        Parameters:
        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
        Returns:
        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

        @Deprecated
        public Path2F.SegmentType currentSegment​(float[] coords)
        Deprecated.
        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
        Parameters:
        coords - storage for current segment's points
        Returns:
        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.