static int rectWidth(Rect r) { ret r == null ? 0 : r.w; }