static bool rectContains(int x1, int y1, int w, int h, Pt p) { ret p.x >= x1 && p.y >= y1 && p.x < x1+w && p.y < y1+h; } static bool rectContains(Rect a, Rect b) { ret b.x >= a.x && b.y >= a.y && b.x2() <= a.x2() && b.y2() <= a.y2(); } sbool rectContains(Rect a, Rectangle b) { ret rectContains(a, toRect(b)); } sbool rectContains(Rect a, int x, int y) { ret a != null && a.contains(x, y); } sbool rectContains(Rect a, Pt p) { ret a != null && p != null && a.contains(p); }