Returns whether this rectangle contains the given rect.
rect
bool containsRect(Rect rect) { return x <= rect.x && y <= rect.y && right >= rect.right && bottom >= rect.bottom; }