static bool rectEmpty(Rect r) { ret r == null || r.w <= 0 || r.h <= 0; }