static BufferedImage renderBackgroundPlusRoundedBoxes(int w, int h, BackgroundPlus s) { BufferedImage bi = newBufferedImage(w, h, toColor(s.background)); Graphics2D g = imageGraphics(bi); for (RoundedBoxWithColor e : s.things) { int x1 = min(e.a.x, e.b.x), y1 = min(e.a.y, e.b.y); int x2 = max(e.a.x, e.b.x), y2 = max(e.a.y, e.b.y); fillRoundedBox(g, x1, y1, x2-x1+1, y2-y1+1, e.roundness, toColor(e.color)); } g.dispose(); ret bi; }