diff options
author | B. Stack <bgstack15@gmail.com> | 2023-01-22 13:56:55 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-01-22 13:56:55 -0500 |
commit | 75e05bc441382db69c842a64c562738cb749214e (patch) | |
tree | 698b60b3b4b914bf7958cf1174d0373909bf1e8f /wx+/dc.h | |
parent | add upstream 11.29 (diff) | |
download | FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.gz FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.tar.bz2 FreeFileSync-75e05bc441382db69c842a64c562738cb749214e.zip |
add upstream 12.0
Diffstat (limited to 'wx+/dc.h')
-rw-r--r-- | wx+/dc.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -147,6 +147,14 @@ void setScaleFactor(wxDC& dc, double scale) } +//add some sanity to moronic const/non-const wxRect::Intersect() +inline +wxRect getIntersection(const wxRect& rect1, const wxRect& rect2) +{ + return rect1.Intersect(rect2); +} + + //---------------------- implementation ------------------------ class RecursiveDcClipper { @@ -158,8 +166,7 @@ public: { oldRect_ = it->second; - wxRect tmp = r; - tmp.Intersect(*oldRect_); //better safe than sorry + const wxRect tmp = getIntersection(r, *oldRect_); //better safe than sorry assert(!tmp.IsEmpty()); //"setting an empty clipping region is equivalent to DestroyClippingRegion()" |