static BufferedImage renderShape(Color bg default Color.white, Shape shape, int w, int h) { BufferedImage img = newBufferedImage(w, h, bg); Graphics2D g = img.createGraphics(); g.setColor(Color.black); g.fill(shape); ret img; } static BufferedImage renderShape(Color bg default Color.white, Shape shape, Rect bounds) { BufferedImage img = newBufferedImage(bounds.w, bounds.h, bg); Graphics2D g = img.createGraphics(); g.translate(-bounds.x, -bounds.y); g.setColor(Color.black); g.fill(shape); ret img; }