static BufferedImage renderShape_antiAlias(Color bg default Color.white, Shape shape, int w, int h) { BufferedImage img = newBufferedImage(w, h, bg); Graphics2D g = antiAliasOn(img.createGraphics()); g.setColor(Color.black); g.fill(shape); ret img; } // uses shape.getBounds() static BufferedImage renderShape_antiAlias(Color bg default Color.white, Shape shape) { if (shape == null) null; Rect r = toRect(shape.getBounds()); BufferedImage img = newBufferedImage(max(1, r.w), max(1, r.h), bg); Graphics2D g = antiAliasOn(img.createGraphics()); g.translate(-r.x, -r.y); g.setColor(Color.black); g.fill(shape); ret img; }