Package ucar.nc2.dt.ugrid.geom
Class PolygonIterator
java.lang.Object
ucar.nc2.dt.ugrid.geom.PolygonIterator
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionPolygonIterator(Polygon2D pl, AffineTransform at) Create a new iterator over the given polygon and with the given transform. -
Method Summary
Modifier and TypeMethodDescriptionintcurrentSegment(double[] coords) Get the current segmentintcurrentSegment(float[] coords) Get the current segmentintReturn the winding rule.booleanisDone()Test if the iterator is done.voidnext()Move the iterator along by one point.
-
Constructor Details
-
PolygonIterator
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 Details
-
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
-