ypoints = null; xpoints = null;
    public boolean generate(Projection proj) {	shape = null;	if (proj == null) {	    Debug.message("omgraphic", "OMLine: null projection in generate!");	    return false;	}	// reset the internals	isPolyline = false;	switch (renderType) {	case RENDERTYPE_XY:	    if (arc != null) {		xpoints = new int[1][];		ypoints = new int[1][];		arc.generate(pts[0], pts[1],			     pts[2], pts[3]);		xpoints[0] = arc.getXPoints();		ypoints[0] = arc.getYPoints();	    } else {		xpoints = new int[1][2];		ypoints = new int[1][2];		if (pts == null) return false;		xpoints[0][0] = pts[0];		ypoints[0][0] = pts[1];		xpoints[0][1] = pts[2];		ypoints[0][1] = pts[3];	    }	    shape = createShape(xpoints[0], ypoints[0], false);	    break;	case RENDERTYPE_OFFSET:	    if (!proj.isPlotable(latlons[0], latlons[1])) {		setNeedToRegenerate(true);//HMMM not the best flag		return false;	    }	    Point p1 = proj.forward(latlons[0], latlons[1]);	    if (arc != null) {		xpoints = new int[1][];		ypoints = new int[1][];		arc.generate(p1.x + pts[0], p1.y + pts[1],			     p1.x + pts[2], p1.y + pts[3]);		xpoints[0] = arc.getXPoints();		ypoints[0] = arc.getYPoints();	    } else {		xpoints = new int[1][2];		ypoints = new int[1][2];		  		xpoints[0][0] = p1.x + pts[0];		ypoints[0][0] = p1.y + pts[1];		xpoints[0][1] = p1.x + pts[2];		ypoints[0][1] = p1.y + pts[3];	    }	    shape = createShape(xpoints[0], ypoints[0], false);	    break;	case RENDERTYPE_LATLON:	    if (arc != null) {		p1 = proj.forward(latlons[0], latlons[1]);		Point p2 = proj.forward(latlons[2], latlons[3]);		xpoints = new int[1][];		ypoints = new int[1][];		arc.generate(p1.x, p1.y, p2.x, p2.y);		xpoints[0] = arc.getXPoints();		ypoints[0] = arc.getYPoints();		shape = createShape(xpoints[0], ypoints[0], false);		isPolyline = true;			    } else {		ArrayList lines =		    proj.forwardLine(			new LatLonPoint(latlons[0], latlons[1]), 			new LatLonPoint(latlons[2], latlons[3]), 			lineType, nsegs);		int size = lines.size();		xpoints = new int[(int)(size/2)][0];		ypoints = new int[xpoints.length][0];		  		for (int i=0, j=0; i<size; i+=2, j++) {		    int[] xps = (int[])lines.get(i);		    int[] yps = (int[])lines.get(i+1);		    xpoints[j] = xps;		    ypoints[j] = yps;		    GeneralPath gp = createShape(xps, yps, false);		    if (shape == null) {			shape = gp;		    } else {			((GeneralPath)shape).append(gp, false);		    }		}		isPolyline = (lineType != LINETYPE_STRAIGHT);	    }	    break;	case RENDERTYPE_UNKNOWN:	    System.err.println("OMLine.generate: invalid RenderType");	    return false;	}	if (doArrowHead) { 	    arrowhead = createArrowHeads();	}	if (Debug.debugging("arc") && arc != null) {	    OMGraphicList arcGraphics = arc.getArcGraphics();	    Debug.output("OMLine generating arcGraphics. " + arcGraphics);	    arcGraphics.generate(proj);	}	// Save memory.	ypoints = null;	xpoints = null;	setNeedToRegenerate(false);	return true;    }