if (Debug.debugging("ompoly")) { e.printStackTrace(); }
    public void render(Graphics g) {	if (shape != null) {	    super.render(g);	    return;	}	if (getNeedToRegenerate() || !isVisible()) return;	// safety: grab local reference of projected points	int[][] xpts = xpoints;	int[][] ypts = ypoints;	if (xpts == null || ypts == null) {	    // Shouldn't get here, but crazy EditableOMPoly events	    // sometimes cause this to happen.  Catch and wait to	    // paint later.	    setNeedToRegenerate(true);	    return;	}	int[] _x, _y;	int i;	int len = xpts.length;	Paint displayPaint = getDisplayPaint();	Paint fillPaint = getFillPaint();	boolean isFillClear = isClear(fillPaint);	boolean isLineClear = isClear(displayPaint);	Paint tm = getTextureMask();		// If shapes are null, then we have to do things the old way.	try {	    for (i = 0; i < len; i++) {		_x = xpts[i];		_y = ypts[i];	    		if (_x == null || _y == null) {		    continue;		}		// render polygon		if (isPolygon) {				    // fill main polygon				    if (!isFillClear) {			// set the interior coloring parameters			setGraphicsForFill(g);			g.fillPolygon(_x, _y, _x.length);			if (tm != null && tm != fillPaint) {			    setGraphicsColor(g, tm);			    g.fillPolygon(_x, _y, _x.length);			}		    }		    		    // only draw outline if different color or matted		    if (matted || !isLineClear || !edgeMatchesFill) {			if (matted) {			    if (g instanceof Graphics2D && 				stroke instanceof BasicStroke) {				((Graphics2D)g).setStroke(new BasicStroke(((BasicStroke)stroke).getLineWidth() + 2f));				setGraphicsColor(g, mattingPaint);				g.drawPolyline(_x, _y, _x.length);			    }			}			setGraphicsForEdge(g);			// for some reason, this used to be drawPolygon			g.drawPolygon(_x, _y, _x.length);		    }		}				// render polyline		else {		    if (matted) {			if (g instanceof Graphics2D && 			    stroke instanceof BasicStroke) {			    ((Graphics2D)g).setStroke(new BasicStroke(((BasicStroke)stroke).getLineWidth() + 2f));			    setGraphicsColor(g, mattingPaint);			    g.drawPolyline(_x, _y, _x.length);			}		    }		    // draw main outline		    setGraphicsForEdge(g);		    g.drawPolyline(_x, _y, _x.length);		}	    }	} catch (Exception e) {	    // Trying to catch any clipping problems from within a JRE	    Debug.output("OMPoly: caught Java rendering exception\n" + 			 e.getMessage());	}    }