summaryrefslogtreecommitdiff
path: root/wx+/dc.h
diff options
context:
space:
mode:
Diffstat (limited to 'wx+/dc.h')
-rw-r--r--wx+/dc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/wx+/dc.h b/wx+/dc.h
index 619f6628..522e3bc8 100644
--- a/wx+/dc.h
+++ b/wx+/dc.h
@@ -195,8 +195,12 @@ public:
}
else
{
- dc_.SetClippingRegion(r);
- clippingAreas_.emplace(&dc_, r);
+ //caveat: actual clipping region is smaller when rect is not fully inside the DC
+ //=> ensure consistency for validateClippingBuffer()
+ const wxRect tmp = getIntersection(r, wxRect(dc.GetSize()));
+
+ dc_.SetClippingRegion(tmp);
+ clippingAreas_.emplace(&dc_, tmp);
}
}
bgstack15