static Rect lineRangeClip(int w, int y1, int y2) { ret rect(0, y1, w, y2-y1); }