APIdia Launch Partner
Top Description Fields Constructors Methods
java.awt.geom

pack-priv Class ArcIterator

extends Object
implements PathIterator
Class Inheritance
All Implemented Interfaces
java.awt.geom.PathIterator
Imports
java.util.*

A utility class to iterate over the path segments of an arc through the PathIterator interface.
Author
Jim Graham

Field Summary

Modifier and TypeField and Description
pack-priv AffineTransform
pack-priv double
pack-priv int
pack-priv double
pack-priv double
h

pack-priv double
pack-priv int
pack-priv int
pack-priv double
w

pack-priv double
x

pack-priv double
y

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static double
btan(double increment)

public int
currentSegment(float[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

Returns the coordinates and type of the current path segment in the iteration.

public int
currentSegment(double[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

Returns the coordinates and type of the current path segment in the iteration.

public int
getWindingRule()

Implements java.awt.geom.PathIterator.getWindingRule.

Return the winding rule for determining the insideness of the path.

public boolean

Returns:

true if there are more points to read
isDone
()

Implements java.awt.geom.PathIterator.isDone.

Tests if there are more points to read.

public void
next()

Implements java.awt.geom.PathIterator.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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

affineback to summary
pack-priv AffineTransform affine
angStRadback to summary
pack-priv double angStRad
arcSegsback to summary
pack-priv int arcSegs
cvback to summary
pack-priv double cv
hback to summary
pack-priv double h
incrementback to summary
pack-priv double increment
indexback to summary
pack-priv int index
lineSegsback to summary
pack-priv int lineSegs
wback to summary
pack-priv double w
xback to summary
pack-priv double x
yback to summary
pack-priv double y

Constructor Detail

ArcIteratorback to summary
pack-priv ArcIterator(Arc2D a, AffineTransform at)

Method Detail

btanback to summary
private static double btan(double increment)
currentSegmentback to summary
public int currentSegment(float[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

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, SEG_QUADTO, SEG_CUBICTO, 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, SEG_QUADTO will return two points, SEG_CUBICTO will return 3 points and SEG_CLOSE will not return any points.

See Also
SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, SEG_CLOSE
currentSegmentback to summary
public int currentSegment(double[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

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, SEG_QUADTO, SEG_CUBICTO, 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, SEG_QUADTO will return two points, SEG_CUBICTO will return 3 points and SEG_CLOSE will not return any points.

See Also
SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, SEG_CLOSE
getWindingRuleback to summary
public int getWindingRule()

Implements java.awt.geom.PathIterator.getWindingRule.

Return the winding rule for determining the insideness of the path.

See Also
WIND_EVEN_ODD, WIND_NON_ZERO
isDoneback to summary
public boolean isDone()

Implements java.awt.geom.PathIterator.isDone.

Tests if there are more points to read.

Returns:boolean

true if there are more points to read

nextback to summary
public void next()

Implements java.awt.geom.PathIterator.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.