correctFill = (proj instanceof Cylindrical) && (!shape.contains(x1, y1) || correctPolar);
correctFill = proj instanceof Cylindrical && ((shouldCenterBeInShape() && !shape.contains(x1, y1)) || correctPolar);
    public boolean generate(Projection proj) {	shape = null;	polarShapeLine = null;	correctFill = false;	if (proj == null) {	    Debug.message("omgraphic", "OMArc: null projection in generate!");	    return false;	}	GeneralPath gp, gp1, gp2;	PathIterator pi;	AffineTransform af = null;	switch (renderType) {	case RENDERTYPE_OFFSET:	    if (!proj.isPlotable(center)) {		setNeedToRegenerate(true);//HMMM not the best flag		return false;	    }	    Point p1 = proj.forward(center.radlat_,				    center.radlon_,				    new Point(), true);	    x1 = p1.x + off_x;	    y1 = p1.y + off_y;	case RENDERTYPE_XY:	    float fwidth = (float)width;	    float fheight = (float)height;	    float transx = (float)x1;	    float transy = (float)y1;	    float x = transx - fwidth/2f;	    float y = transy - fheight/2f;	    Shape arcShape = createArcShape(x, y, fwidth, fheight);	    if (rotationAngle != DEFAULT_ROTATIONANGLE) {		af = new AffineTransform();		af.rotate(rotationAngle, transx, transy);	    }// 	    pi = a2d.getPathIterator(af);	    pi = arcShape.getPathIterator(af);	    gp = new GeneralPath();	    gp.append(pi, false);	    // In X/Y or Offset RenderType, there is only one shape.	    shape = gp;	    break;	case RENDERTYPE_LATLON:	    ArrayList coordLists = null;	    coordLists = getCoordLists(proj, center, radius, nverts);	    Point p = proj.forward(center.radlat_,				   center.radlon_,				   new Point(), true);	    x1 = p.x;	    y1 = p.y;	    int size = coordLists.size();	    GeneralPath tempShape = null;	    for (int i=0; i<size; i+=2) {		int[] xpoints = (int[])coordLists.get(i);		int[] ypoints = (int[])coordLists.get(i+1);		gp = createShape(xpoints, ypoints, false);		if (shape == null) {		    shape = gp;		} else {		    ((GeneralPath)shape).append(gp, false);		}		//  		if (i == 0) {		correctFill = (proj instanceof Cylindrical) &&		    (!shape.contains(x1, y1) || correctPolar);		//  		}		if (correctFill) {		    int[][] alts = doPolarFillCorrection(			xpoints, ypoints,			(center.radlat_ > 0f) ? -1 : proj.getWidth()+1);		    int gp2length = alts[0].length - 2;		    gp1 = createShape(alts[0], alts[1], true);		    gp2 = createShape(alts[0], alts[1], 0,				      gp2length, false);		    if (tempShape == null || polarShapeLine == null) {			tempShape = gp1;			polarShapeLine = gp2;		    } else {			tempShape.append(gp1, false);			polarShapeLine.append(gp2, false);		    }                }	    }	    if (tempShape != null) {		shape = tempShape;	    }	    break;	case RENDERTYPE_UNKNOWN:	    System.err.println("OMArc.generate(): invalid RenderType");	    return false;	}	setNeedToRegenerate(false);	return true;    }