static Rect translateRect(Rect r, int x, int y) { ret new Rect(r.x+x, r.y+y, r.w, r.h); }