summaryrefslogtreecommitdiff
path: root/src/helpers/Region.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Region.cpp')
-rw-r--r--src/helpers/Region.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/helpers/Region.cpp b/src/helpers/Region.cpp
index df7de442..8f180416 100644
--- a/src/helpers/Region.cpp
+++ b/src/helpers/Region.cpp
@@ -88,6 +88,11 @@ CRegion& CRegion::invert(pixman_box32_t* box) {
return *this;
}
+CRegion& CRegion::invert(const CBox& box) {
+ pixman_box32 pixmanBox = {box.x, box.y, box.w + box.x, box.h + box.y};
+ return this->invert(&pixmanBox);
+}
+
CRegion& CRegion::translate(const Vector2D& vec) {
pixman_region32_translate(&m_rRegion, vec.x, vec.y);
return *this;