org.gvsig.fmap.geom.impl
Class DrawGeneralPathXIterator

java.lang.Object
  extended by org.gvsig.fmap.geom.impl.DrawGeneralPathXIterator
All Implemented Interfaces:
PathIterator

public class DrawGeneralPathXIterator
extends Object
implements PathIterator

AWT PathIterator to draw a GeneralPathX object. While iterating the {@link GeneralPathX) each point coordinates are converted to int. If a segment is a PathIterator#SEG_LINETO and the integer coordinates are the same as the previous point ones, the point is ignored and the next one is looked for.

Author:
gvSIG Team

Field Summary
protected  AffineTransform affine
           
protected  GeneralPathX path
           
protected  int pointIdx
           
protected  int typeIdx
           
 
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
DrawGeneralPathXIterator(GeneralPathX path)
          Constructs an iterator given a GeneralPathX.
DrawGeneralPathXIterator(GeneralPathX path, AffineTransform at)
          Constructs an iterator given a GeneralPathX and an optional AffineTransform.
 
Method Summary
 int currentSegment(double[] coords)
           
 int currentSegment(float[] coords)
           
 int getWindingRule()
           
 boolean isDone()
           
 void next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeIdx

protected int typeIdx

pointIdx

protected int pointIdx

path

protected GeneralPathX path

affine

protected AffineTransform affine
Constructor Detail

DrawGeneralPathXIterator

public DrawGeneralPathXIterator(GeneralPathX path)
Constructs an iterator given a GeneralPathX.

See Also:
GeneralPathX.getPathIterator(java.awt.geom.AffineTransform)

DrawGeneralPathXIterator

public DrawGeneralPathXIterator(GeneralPathX path,
                                AffineTransform at)
Constructs an iterator given a GeneralPathX and an optional AffineTransform.

See Also:
GeneralPathX.getPathIterator(java.awt.geom.AffineTransform)
Method Detail

getWindingRule

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

isDone

public boolean isDone()
Specified by:
isDone in interface PathIterator

next

public void next()
Specified by:
next in interface PathIterator

currentSegment

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

currentSegment

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


Copyright © 2004-2013 gvSIG. All Rights Reserved.