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

Quick Search    Search Deep

java.awt.geom
Class Area.AreaIterator  view Area.AreaIterator download Area.AreaIterator.java

java.lang.Object
  extended byjava.awt.geom.Area.AreaIterator
All Implemented Interfaces:
PathIterator
Enclosing class:
Area

private class Area.AreaIterator
extends java.lang.Object
implements PathIterator

Private pathiterator object.


Nested Class Summary
(package private)  class Area.AreaIterator.IteratorSegment
           
 
Field Summary
private  AffineTransform at
           
private  int index
           
private  java.util.Vector segments
           
 
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
Area.AreaIterator(AffineTransform at)
          The contructor here does most of the work, creates a vector of IteratorSegments, which can readily be returned
 
Method Summary
 int currentSegment(double[] coords)
          Returns the coordinates of the next point(s), as well as the type of line segment.
 int currentSegment(float[] coords)
          Returns the coordinates of the next point(s), as well as the type of line segment.
 int getWindingRule()
          Returns the winding rule to determine which points are inside this path.
 boolean isDone()
          Tests if the iterator is exhausted.
 void next()
          Advance to the next segment in the iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

segments

private java.util.Vector segments

index

private int index

at

private AffineTransform at
Constructor Detail

Area.AreaIterator

public Area.AreaIterator(AffineTransform at)
The contructor here does most of the work, creates a vector of IteratorSegments, which can readily be returned

Method Detail

currentSegment

public int currentSegment(double[] coords)
Description copied from interface: PathIterator
Returns the coordinates of the next point(s), as well as the type of line segment. The input array must be at least a double[6], to accomodate up to three (x,y) point pairs (although if you know the iterator is flat, you can probably get by with a double[2]). If the returned type is SEG_MOVETO or SEG_LINETO, the first point in the array is modified; if the returned type is SEG_QUADTO, the first two points are modified; if the returned type is SEG_CUBICTO, all three points are modified; and if the returned type is SEG_CLOSE, the array is untouched.

Specified by:
currentSegment in interface PathIterator

currentSegment

public int currentSegment(float[] coords)
Description copied from interface: PathIterator
Returns the coordinates of the next point(s), as well as the type of line segment. The input array must be at least a float[6], to accomodate up to three (x,y) point pairs (although if you know the iterator is flat, you can probably get by with a float[2]). If the returned type is SEG_MOVETO or SEG_LINETO, the first point in the array is modified; if the returned type is SEG_QUADTO, the first two points are modified; if the returned type is SEG_CUBICTO, all three points are modified; and if the returned type is SEG_CLOSE, the array is untouched.

Specified by:
currentSegment in interface PathIterator

getWindingRule

public int getWindingRule()
Description copied from interface: PathIterator
Returns the winding rule to determine which points are inside this path.

Specified by:
getWindingRule in interface PathIterator

isDone

public boolean isDone()
Description copied from interface: PathIterator
Tests if the iterator is exhausted. If this returns true, currentSegment and next may throw a NoSuchElementException (although this is not required).

Specified by:
isDone in interface PathIterator

next

public void next()
Description copied from interface: PathIterator
Advance to the next segment in the iteration. It is not specified what this does if called when isDone() returns true.

Specified by:
next in interface PathIterator