aboutsummaryrefslogtreecommitdiff
path: root/common/rect.h
diff options
context:
space:
mode:
authorVicent Marti2008-10-09 11:49:35 +0000
committerVicent Marti2008-10-09 11:49:35 +0000
commit1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1 (patch)
tree3b454a1b1e0dca09eada21287ed7b7e8a7cf4226 /common/rect.h
parent5dd381932f3ed501a27fe97f48ef30331b2924d5 (diff)
parent000eedb0737dbe400d016edf213928dbb1a227d3 (diff)
downloadscummvm-rg350-1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1.tar.gz
scummvm-rg350-1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1.tar.bz2
scummvm-rg350-1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1.zip
Manual merge of the GSoC2008 GUI branch. (71 files)
svn-id: r34757
Diffstat (limited to 'common/rect.h')
-rw-r--r--common/rect.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h
index dcf1c8b421..962069bf48 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -124,6 +124,16 @@ struct Rect {
return contains(p.x, p.y);
}
+ /*! @brief check if the given rect is _fully_ contained inside this rectangle
+
+ @param r The rectangle to check
+
+ @retur true if the given rect is inside, false otherwise
+ */
+ bool contains(const Rect &r) const {
+ return (left < r.left) && (right > r.right) && (top < r.top) && (bottom > r.bottom);
+ }
+
/*! @brief check if given rectangle intersects with this rectangle
@param r the rectangle to check