Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.awt.geom
Class GeneralPath.GeneralPathIterator  view GeneralPath.GeneralPathIterator download GeneralPath.GeneralPathIterator.java

java.lang.Object
  extended byjava.awt.geom.GeneralPath.GeneralPathIterator
All Implemented Interfaces:
PathIterator
Enclosing class:
GeneralPath

private static class GeneralPath.GeneralPathIterator
extends java.lang.Object
implements PathIterator

A PathIterator that iterates over the segments of a GeneralPath.


Field Summary
private static int[] NUM_COORDS
          The number of coordinate values for each segment type.
(package private)  GeneralPath path
          The GeneralPath whose segments are being iterated.
private  int pos
          The current position of the iterator.
private  AffineTransform transform
          The affine transformation used to transform coordinates.
 
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
(package private) GeneralPath.GeneralPathIterator(GeneralPath path, AffineTransform transform)
          Constructs a new iterator for enumerating the segments of a GeneralPath.
 
Method Summary
 int currentSegment(double[] coords)
          Returns the current segment in double coordinates.
 int currentSegment(float[] coords)
          Returns the current segment in float coordinates.
 int getWindingRule()
          Returns the current winding rule of the GeneralPath.
 boolean isDone()
          Determines whether the iterator has reached the last segment in the path.
 void next()
          Advances the iterator position by one segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_COORDS

private static final int[] NUM_COORDS
The number of coordinate values for each segment type.


path

final GeneralPath path
The GeneralPath whose segments are being iterated. This is package-private to avoid an accessor method.


transform

private final AffineTransform transform
The affine transformation used to transform coordinates.


pos

private int pos
The current position of the iterator.

Constructor Detail

GeneralPath.GeneralPathIterator

GeneralPath.GeneralPathIterator(GeneralPath path,
                                AffineTransform transform)
Constructs a new iterator for enumerating the segments of a GeneralPath.

Method Detail

getWindingRule

public int getWindingRule()
Returns the current winding rule of the GeneralPath.

Specified by:
getWindingRule in interface PathIterator

isDone

public boolean isDone()
Determines whether the iterator has reached the last segment in the path.

Specified by:
isDone in interface PathIterator

next

public void next()
Advances the iterator position by one segment.

Specified by:
next in interface PathIterator

currentSegment

public int currentSegment(float[] coords)
Returns the current segment in float coordinates.

Specified by:
currentSegment in interface PathIterator

currentSegment

public int currentSegment(double[] coords)
Returns the current segment in double coordinates.

Specified by:
currentSegment in interface PathIterator