static Pt rectsMaxSize(L rects) { int w = 0, h = 0; for (Rect r : rects) { w = max(w, r.w); h = max(h, r.h); } ret new Pt(w, h); }