static bool rectSizeIs(Rect r, int w, int h) { ret r != null && r.w == w && r.h == h; }