static Rect toRect(Rectangle r) { ret r == null ? null : Rect(r); }