* if (Debug.debugging("proj")) { dumpPoly(rawllpts, altx, * ys); }
* if (Debug.debugging("proj")) { dumpPoly(rawllpts, altx, ys); }
    protected ArrayList _forwardPoly(float[] rawllpts, int ltype, int nsegs, boolean isFilled) {        int n, k, flag = 0, min = 0, max = 0, xp, xadj = 0;        // determine length of pairs list        int len = rawllpts.length >> 1; // len/2, chop off extra        if (len < 2)            return new ArrayList(0);        // handle complicated line in specific routines        if (isComplicatedLineType(ltype)) {            return doPolyDispatch(rawllpts, ltype, nsegs, isFilled);        }        // determine when to stop        Point temp = new Point(0, 0);        int[] xs = new int[len];        int[] ys = new int[len];        // forward project the first point        forward(rawllpts[0], rawllpts[1], temp, true);        xp = temp.x;        xs[0] = temp.x;        ys[0] = temp.y;        // forward project the other points        for (n = 1, k = 2; n < len; n++, k += 2) {            forward(rawllpts[k], rawllpts[k + 1], temp, true);            xs[n] = temp.x;            ys[n] = temp.y;            // segment crosses longitude along screen edge            if (Math.abs(xp - xs[n]) >= half_world) {                flag += (xp < xs[n]) ? -1 : 1;// inc/dec the wrap                // count                min = (flag < min) ? flag : min;// left wrap count                max = (flag > max) ? flag : max;// right wrap count                xadj = flag * world.x;// adjustment to x coordinates                // Debug.output("flag=" + flag + " xadj=" + xadj);            }            xp = temp.x;// save previous unshifted x coordinate            if (flag != 0) {                xs[n] += xadj;// adjust x coordinates            }        }        min *= -1;// positive magnitude        // now create the return list        ArrayList ret_val = null;        ret_val = new ArrayList(2 + 2 * (max + min));        ret_val.add(xs);        ret_val.add(ys);        int[] altx = null;        /*         * if (Debug.debugging("proj")) { dumpPoly(rawllpts, xs, ys); }         */        // add the extra left-wrap polys        for (int i = 1; i <= min; i++) {            altx = new int[xs.length];            xadj = i * world.x;// shift opposite            for (int j = 0; j < altx.length; j++) {                altx[j] = xs[j] + xadj;            }            ret_val.add(altx);            ret_val.add(ys);            /*             * if (Debug.debugging("proj")) { dumpPoly(rawllpts, altx,             * ys); }             */        }        // add the extra right-wrap polys        for (int i = 1; i <= max; i++) {            altx = new int[xs.length];            xadj = -i * world.x;// shift opposite            for (int j = 0; j < altx.length; j++) {                altx[j] = xs[j] + xadj;            }            ret_val.add(altx);            ret_val.add(ys);            /*             * if (Debug.debugging("proj")) { dumpPoly(rawllpts, altx,             * ys); }             */        }        return ret_val;    }// _forwardPoly()