srecord noeq G22MeshGroup(L meshes) is MakesBufferedImage { public Rect bounds() { ret mergeRects(map(meshes, m -> m.bounds())); } public int getWidth() { ret bounds().w; } public int getHeight() { ret bounds().h; } public BufferedImage getBufferedImage() { var r = bounds(); if (r == null) null; ret new G22VisualizeMeshes( widthAndHeight(r.x2(), r.y2()), meshes)!; } }