From d287d1d35a5bf96487d7abdeee8c42a851d5d292 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 2 Apr 2024 09:18:58 -0400 Subject: add upstream 13.5 --- wx+/dc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wx+/dc.h') 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); } } -- cgit