Package ucar.nc2.dt.ugrid.geom
Class PolygonIterator
- java.lang.Object
-
- ucar.nc2.dt.ugrid.geom.PolygonIterator
-
- All Implemented Interfaces:
PathIterator
public class PolygonIterator extends Object implements PathIterator
An iterator over Polygon2D. This class is private to this package.
-
-
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, 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 intcurrentSegment(double[] coords)Get the current segmentintcurrentSegment(float[] coords)Get the current segmentintgetWindingRule()Return the winding rule.booleanisDone()Test if the iterator is done.voidnext()Move the iterator along by one point.
-
-
-
Constructor Detail
-
PolygonIterator
public PolygonIterator(Polygon2D pl, 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:
currentSegmentin interfacePathIterator
-
currentSegment
public int currentSegment(float[] coords)
Get the current segment- Specified by:
currentSegmentin interfacePathIterator
-
getWindingRule
public int getWindingRule()
Return the winding rule. This is WIND_NON_ZERO.- Specified by:
getWindingRulein interfacePathIterator
-
isDone
public boolean isDone()
Test if the iterator is done.- Specified by:
isDonein interfacePathIterator
-
next
public void next()
Move the iterator along by one point.- Specified by:
nextin interfacePathIterator
-
-