// We're checking to see if all points in Rect o // are contained within r. public static bool Contains(this Rect r, Rect o) { return ( r.Contains(o.TopLeft()) && r.Contains(o.TopRight()) && r.Contains(o.BotLeft()) && r.Contains(o.BotRight()) ); }