summaryrefslogtreecommitdiff
path: root/src/region.cpp
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-11-13 13:48:17 +0100
committerDennis Kasprzyk <onestone@compiz-fusion.org>2008-11-13 13:48:17 +0100
commitccf51d9c23e91858b1ed59d8ffeef20a5ab9071a (patch)
tree3d007dffe8f47673f7f4b872a2fdea7a25724cee /src/region.cpp
parent2fbe124f6da74e50fcdb6bc8c43d34bd9c2971e6 (diff)
downloadunity-window-decorator-ccf51d9c23e91858b1ed59d8ffeef20a5ab9071a.tar.gz
unity-window-decorator-ccf51d9c23e91858b1ed59d8ffeef20a5ab9071a.tar.bz2
Added shrink region functions.
Diffstat (limited to 'src/region.cpp')
-rw-r--r--src/region.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/region.cpp b/src/region.cpp
index 7313943..b3f6de8 100644
--- a/src/region.cpp
+++ b/src/region.cpp
@@ -248,6 +248,35 @@ CompRegion::translated (const CompPoint &p) const
return rv;
}
+void
+CompRegion::shrink (int dx, int dy)
+{
+ priv->makeReal ();
+ XShrinkRegion (handle (), dx, dy);
+}
+
+void
+CompRegion::shrink (const CompPoint &p)
+{
+ translate (p.x (), p.y ());
+}
+
+CompRegion
+CompRegion::shrinked (int dx, int dy) const
+{
+ CompRegion rv (*this);
+ rv.shrink (dx, dy);
+ return rv;
+}
+
+CompRegion
+CompRegion::shrinked (const CompPoint &p) const
+{
+ CompRegion rv (*this);
+ rv.shrink (p);
+ return rv;
+}
+
CompRegion
CompRegion::united (const CompRegion &r) const
{