diff options
author | Erkin Bahceci <erkinbah@gmail.com> | 2009-12-18 07:24:06 -0600 |
---|---|---|
committer | Erkin Bahceci <erkinbah@gmail.com> | 2009-12-18 07:24:06 -0600 |
commit | f8430b73b116ef2242151a84f3379ba60d2fbf64 (patch) | |
tree | 8c799f15cc3a2a230e5dcafd8e46dc55f51cce60 /src | |
parent | 5ce57a6682f936308e8c8769bac0c4c636c0b8ab (diff) | |
download | zcomp-f8430b73b116ef2242151a84f3379ba60d2fbf64.tar.gz zcomp-f8430b73b116ef2242151a84f3379ba60d2fbf64.tar.bz2 |
Add another contains method to CompRegion.
Diffstat (limited to 'src')
-rw-r--r-- | src/region.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/region.cpp b/src/region.cpp index 44bee8c..334be13 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -140,6 +140,16 @@ CompRegion::contains (const CompRect &r) const return result == RectangleIn; } +bool +CompRegion::contains (int x, int y, int width, int height) const +{ + int result; + + result = XRectInRegion (handle (), x, y, width, height); + + return result == RectangleIn; +} + CompRegion CompRegion::intersected (const CompRegion &r) const { |