Class QuadraticFlattenedPathIterator

  • All Implemented Interfaces:
    PathIterator


    public class QuadraticFlattenedPathIterator
    extends Object
    implements PathIterator
    A PathIterator that flattens all cubic segments into a series of quadratic segments.

    The number of quadratic segments used to emulate a cubic segment will vary. It may even be accurate. :)

    • Field Detail

      • MAX_DIVISIONS

        protected static int MAX_DIVISIONS
        The maximum number of divisions between extrema this will calculate
      • pointsVector

        protected static Vector<Point2D> pointsVector
        Used for debugging. If non-null, this keeps a list of the most frequently used edges of quadratic arcs.
      • extremaVector

        protected static Vector<Point2D> extremaVector
        Used for debugging. If non-null, this keeps a list of the extrema found in the cubic curves.
    • Constructor Detail

      • QuadraticFlattenedPathIterator

        public QuadraticFlattenedPathIterator(PathIterator i)
        Constructs a QuadraticflattenedPathIterator.
        Parameters:
        i -
      • QuadraticFlattenedPathIterator

        public QuadraticFlattenedPathIterator(Shape s)
        Constructs a QuadraticFlattenedPathIterator
    • Method Detail

      • currentSegment

        public int currentSegment(double[] d)
      • currentSegment

        public int currentSegment(float[] f)
      • getWindingRule

        public int getWindingRule()
      • isDone

        public boolean isDone()
      • next

        public void next()