Class PolygonIterator

  • All Implemented Interfaces:
    java.awt.geom.PathIterator

    public class PolygonIterator
    extends java.lang.Object
    implements java.awt.geom.PathIterator
    An iterator over Polygon2D. This class is private to this package.
    Version:
    $Id$
    Author:
    John Reekie
    • Field Summary

      • Fields inherited from interface java.awt.geom.PathIterator

        SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
    • Constructor Summary

      Constructors 
      Constructor Description
      PolygonIterator​(Polygon2D pl, java.awt.geom.AffineTransform at)
      Create a new iterator over the given polygon and with the given transform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int currentSegment​(double[] coords)
      Get the current segment
      int currentSegment​(float[] coords)
      Get the current segment
      int getWindingRule()
      Return the winding rule.
      boolean isDone()
      Test if the iterator is done.
      void next()
      Move the iterator along by one point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PolygonIterator

        public PolygonIterator​(Polygon2D pl,
                               java.awt.geom.AffineTransform at)
        Create a new iterator over the given polygon and with the given transform. If the transform is null, that is taken to be the same as a unit Transform.
    • Method Detail

      • currentSegment

        public int currentSegment​(double[] coords)
        Get the current segment
        Specified by:
        currentSegment in interface java.awt.geom.PathIterator
      • currentSegment

        public int currentSegment​(float[] coords)
        Get the current segment
        Specified by:
        currentSegment in interface java.awt.geom.PathIterator
      • getWindingRule

        public int getWindingRule()
        Return the winding rule. This is WIND_NON_ZERO.
        Specified by:
        getWindingRule in interface java.awt.geom.PathIterator
      • isDone

        public boolean isDone()
        Test if the iterator is done.
        Specified by:
        isDone in interface java.awt.geom.PathIterator
      • next

        public void next()
        Move the iterator along by one point.
        Specified by:
        next in interface java.awt.geom.PathIterator