uk.ac.starlink.diva.interp
Class InterpolatedCurveIterator

java.lang.Object
  extended by uk.ac.starlink.diva.interp.InterpolatedCurveIterator
All Implemented Interfaces:
PathIterator

public class InterpolatedCurveIterator
extends Object
implements PathIterator

An iterator over an InterpolatedCurve2D.

Version:
$Id$
Author:
Peter W. Draper

Field Summary
 
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
InterpolatedCurveIterator(InterpolatedCurve2D curve, AffineTransform at)
          Create an iterator for the given InterpolatedCurve2D.
 
Method Summary
 int currentSegment(double[] coords)
           
 int currentSegment(float[] coords)
           
 int getWindingRule()
           
 boolean isDone()
          Test if the iterator is done.
 void next()
          Move the iterator along by one point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterpolatedCurveIterator

public InterpolatedCurveIterator(InterpolatedCurve2D curve,
                                 AffineTransform at)
Create an iterator for the given InterpolatedCurve2D.

Parameters:
curve - the InterpolatedCurve2D instance to iterate over.
at - a transform to apply to the InterpolatedCurve2D vertices. If null then an identity transform will be used.
Method Detail

currentSegment

public int currentSegment(double[] coords)
Specified by:
currentSegment in interface PathIterator

currentSegment

public int currentSegment(float[] coords)
Specified by:
currentSegment in interface PathIterator

getWindingRule

public int getWindingRule()
Specified by:
getWindingRule in interface PathIterator

isDone

public boolean isDone()
Test if the iterator is done.

Specified by:
isDone in interface PathIterator

next

public void next()
Move the iterator along by one point.

Specified by:
next in interface PathIterator


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.