static L allPointsInRect(int w, int h) { ret allPointsInRect(rect(w, h)); } static L allPointsInRect(Rect r) { int w = r.w, h = r.h; L l = emptyList(w*h); for y to h: for x to w: l.add(pt(r.x+x, r.y+y)); ret l; }