summaryrefslogtreecommitdiff
path: root/src/region.cpp
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-07-29 19:40:39 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-07-29 19:40:39 +0800
commite33cd6a8e93ca6fd0ff3a2bdcfd24ddc6282ada3 (patch)
tree43cc8c0e2c1270c1ce4dee284b72e480f14230ec /src/region.cpp
parenta456995737489be16d220288cc2a20ad9d16ff79 (diff)
downloadunity-window-decorator-e33cd6a8e93ca6fd0ff3a2bdcfd24ddc6282ada3.tar.gz
unity-window-decorator-e33cd6a8e93ca6fd0ff3a2bdcfd24ddc6282ada3.tar.bz2
Initialize XPolygonRegion arguments and use WindingRule
Diffstat (limited to 'src/region.cpp')
-rw-r--r--src/region.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/region.cpp b/src/region.cpp
index d2239d3..28879ac 100644
--- a/src/region.cpp
+++ b/src/region.cpp
@@ -74,8 +74,16 @@ CompRegion::CompRegion (const CompRect &r)
CompRegion::CompRegion (const CompPoint::vector &points)
{
XPoint pts[points.size ()];
+ int count = 0;
+
+ foreach (CompPoint &p, points)
+ {
+ pts[count].x = p.x ();
+ pts[count].y = p.y ();
+ }
+
priv = new PrivateRegion ();
- priv->region = XPolygonRegion (pts, points.size (), 1);
+ priv->region = XPolygonRegion (pts, points.size (), WindingRule);
priv->box.extents = priv->region->extents;
priv->box.numRects = priv->region->numRects;
priv->box.rects = &priv->box.extents;