private void pathIterAdvance() {
        if (progress < -1) {
            progress++;
            return;
        }
        //float p[] = {0,0,0,0,0,0};
        iter.next();
        if ((!iter.isDone())&&(iter.currentSegment(p)==PathIterator.SEG_CLOSE)) iter.next();
        if (iter.isDone()) {
            iter = area.getPathIterator(null,flatness);
            progress++;
            // if this is the first time done, pathIterProgress now says 0 for the first time
        }
        else {
            if (progress >= 0) {
                progress++; // this isn't the first time around, counting now
            }
        }
        p[0] = currentPoint[0];
        p[1] = currentPoint[1];
        doGetPoint();
        if (((p[0]-currentPoint[0])*(p[0]-currentPoint[0])+(p[1]-currentPoint[1])*(p[1]-currentPoint[1])
            < 0.001)&&(!isDone())) {
            pathIterAdvance();
        }
    }