bool containsRect(Rect other) { return other.x >= x && other.right <= right && other.y >= y && other.bottom <= bottom; }