static BufferedImage renderShape(Shape shape, int w, int h) { BufferedImage img = newBufferedImage(w, h, Color.white); Graphics2D g = img.createGraphics(); g.setColor(Color.black); g.fillShape(shape); g.dispose(); ret img; }