|
@@ -115,6 +115,16 @@ public:
|
|
|
return rect;
|
|
|
}
|
|
|
|
|
|
+ bool contains_vertically(int y) const
|
|
|
+ {
|
|
|
+ return y >= top() && y <= bottom();
|
|
|
+ }
|
|
|
+
|
|
|
+ bool contains_horizontally(int x) const
|
|
|
+ {
|
|
|
+ return x >= left() && x <= right();
|
|
|
+ }
|
|
|
+
|
|
|
bool contains(int x, int y) const
|
|
|
{
|
|
|
return x >= m_location.x() && x <= right() && y >= m_location.y() && y <= bottom();
|