Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.geom.FlatteningPathIterator

java.lang.Object
    |
    +----java.awt.geom.FlatteningPathIterator

public class FlatteningPathIterator
extends Object
implements PathIterator
This class returns a flattened view of another PathIterator object. Other Shape classes can use this class to provide flattening behavior for their paths without having to perform the interpolation calculations themselves.


Constructor Summary
 FlatteningPathIterator(PathIterator src, double flatness)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
 

Method Summary
int  currentSegment(float[] coords)
Returns the coordinates and type of the current path segment in the iteration.
int  currentSegment(double[] coords)
Returns the coordinates and type of the current path segment in the iteration.
int  getWindingRule()
Return the winding rule for determining the interior of the path.
boolean  isDone()
Tests if there are more points to read.
void  next()
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatteningPathIterator

public FlatteningPathIterator(PathIterator src,
                              double flatness)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
Parameters:
src - the original unflattened path being iterated over
flatness - the maximum allowable distance between the control points
Method Detail

getWindingRule

public int getWindingRule()
Return the winding rule for determining the interior of the path.
Implements:
getWindingRule in interface PathIterator
See Also:
WIND_EVEN_ODD, WIND_NON_ZERO

isDone

public boolean isDone()
Tests if there are more points to read.
Implements:
isDone in interface PathIterator
Returns:
true if there are more points to read

next

public void next()
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
Implements:
next in interface PathIterator

currentSegment

public int currentSegment(float[] coords)
Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, or SEG_CLOSE. A float array of length 6 must be passed in and may be used to store the coordinates of the point(s). Each point is stored as a pair of float x,y coordinates. SEG_MOVETO and SEG_LINETO types will return one point, and SEG_CLOSE will not return any points.
Implements:
currentSegment in interface PathIterator
See Also:
SEG_MOVETO, SEG_LINETO, SEG_CLOSE

currentSegment

public int currentSegment(double[] coords)
Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, or SEG_CLOSE. A double array of length 6 must be passed in and may be used to store the coordinates of the point(s). Each point is stored as a pair of double x,y coordinates. SEG_MOVETO and SEG_LINETO types will return one point, and SEG_CLOSE will not return any points.
Implements:
currentSegment in interface PathIterator
See Also:
SEG_MOVETO, SEG_LINETO, SEG_CLOSE

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.