fn paint(w: usize, h: usize, f: impl FnOnce(Rect, &mut Buffer)) -> Vec<String>
Render into a fresh w × h buffer and flatten it to rows.
w × h