Class GeneralPathXIterator

java.lang.Object
org.gvsig.fmap.geom.jts.gputils.GeneralPathXIterator
All Implemented Interfaces:
PathIterator
Direct Known Subclasses:
AbstractLine.LineIterator, AbstractMultiCurve.MultiCurveIterator, AbstractMultiPoint.PointIterator, AbstractMultiPolygon.MultiPolygonIterator, AbstractMultiSurface.MultiSurfaceIterator, AbstractSpline.SplineIterator, Point2D.PointIterator, Point2DM.PointIterator, Point3D.PointIterator, Point3DM.PointIterator, PointIterator

public class GeneralPathXIterator extends Object implements PathIterator
This class represents the iterator for General Paths X. It can be used to retrieve all of the elements in a GeneralPathX. The
invalid reference
GeneralPathX#getPathIterator
method is used to create a GeneralPathXIterator for a particular GeneralPathX. The iterator can be used to iterator the path only once. Subsequent iterations require a new iterator.
Version:
10 Feb 1997
Author:
Jim Graham
See Also:
  • invalid reference
    GeneralPathX
  • Field Details

    • typeIdx

      protected int typeIdx
    • pointIdx

      protected int pointIdx
    • path

      protected org.gvsig.fmap.geom.primitive.IGeneralPathX path
    • affine

      protected AffineTransform affine
  • Constructor Details

    • GeneralPathXIterator

      public GeneralPathXIterator(org.gvsig.fmap.geom.primitive.IGeneralPathX path)
      Constructs an iterator given a GeneralPathX.
      See Also:
      • invalid reference
        GeneralPathX#getPathIterator
    • GeneralPathXIterator

      public GeneralPathXIterator(org.gvsig.fmap.geom.primitive.IGeneralPathX path, AffineTransform at)
      Constructs an iterator given a GeneralPathX and an optional AffineTransform.
      See Also:
      • invalid reference
        GeneralPathX#getPathIterator
  • Method Details

    • getWindingRule

      public int getWindingRule()
      Return the winding rule for determining the interior of the path.
      Specified by:
      getWindingRule in interface PathIterator
      See Also:
    • isDone

      public boolean isDone()
      Tests if there are more points to read.
      Specified by:
      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.
      Specified by:
      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, 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.
      Specified by:
      currentSegment in interface PathIterator
      See Also:
    • 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, 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.
      Specified by:
      currentSegment in interface PathIterator
      See Also:
    • currentSegment3D

      public int currentSegment3D(double[] coords)