int i, j, npts;
int i, j;
        public boolean generate(Projection proj) {            int i, j, npts;            shape = null;            if (proj == null) {                Debug.message("omgraphic",                        "OMPoly: null projection in generate!");                return false;            }            // polygon/polyline project the polygon/polyline.            // Vertices should already be in radians.            ArrayList vector = proj.forwardPoly(rawllpts,                    lineType,                    nsegs,                    isPolygon);            int size = vector.size();            if (!doShapes) {                xpoints = new int[(int) (size / 2)][0];                ypoints = new int[xpoints.length][0];            }            // We could call create shape, but this is more efficient.            for (i = 0, j = 0; i < size; i += 2, j++) {                if (doShapes) {                    GeneralPath gp = BasicGeometry.createShape((int[]) vector.get(i),                            (int[]) vector.get(i + 1),                            isPolygon);                    if (shape == null) {                        shape = gp;                    } else {                        ((GeneralPath) shape).append(gp, false);                    }                } else {                    xpoints[j] = (int[]) vector.get(i);                    ypoints[j] = (int[]) vector.get(i + 1);                }            }            setNeedToRegenerate(false);            return true;        }