Package diva.util.java2d
Class PolygonIterator
- java.lang.Object
-
- diva.util.java2d.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
-
-
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 segmentint
currentSegment(float[] coords)
Get the current segmentint
getWindingRule()
Return the winding rule.boolean
isDone()
Test if the iterator is done.void
next()
Move the iterator along by one point.
-
-
-
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 interfacejava.awt.geom.PathIterator
-
currentSegment
public int currentSegment(float[] coords)
Get the current segment- Specified by:
currentSegment
in interfacejava.awt.geom.PathIterator
-
getWindingRule
public int getWindingRule()
Return the winding rule. This is WIND_NON_ZERO.- Specified by:
getWindingRule
in interfacejava.awt.geom.PathIterator
-
isDone
public boolean isDone()
Test if the iterator is done.- Specified by:
isDone
in interfacejava.awt.geom.PathIterator
-
next
public void next()
Move the iterator along by one point.- Specified by:
next
in interfacejava.awt.geom.PathIterator
-
-