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