From 583d22efb5901296d1e3dcbc091be5dee9d8a14f Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 14 Jun 2019 22:33:49 -0400 Subject: 10.13 --- wx+/dc.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'wx+/dc.h') diff --git a/wx+/dc.h b/wx+/dc.h index 311080dd..bcf62a14 100644 --- a/wx+/dc.h +++ b/wx+/dc.h @@ -17,20 +17,19 @@ namespace zen { /* -1. wxDCClipper does *not* stack: another fix for yet another poor wxWidgets implementation + 1. wxDCClipper does *not* stack: another fix for yet another poor wxWidgets implementation -class RecursiveDcClipper -{ - RecursiveDcClipper(wxDC& dc, const wxRect& r) : dc_(dc) -}; + class RecursiveDcClipper + { + RecursiveDcClipper(wxDC& dc, const wxRect& r) + }; ------------------------------------------------------------------------------------------------- + 2. wxAutoBufferedPaintDC skips one pixel on left side when RTL layout is active: a fix for a poor wxWidgets implementation -2. wxAutoBufferedPaintDC skips one pixel on left side when RTL layout is active: a fix for a poor wxWidgets implementation -class BufferedPaintDC -{ - BufferedPaintDC(wxWindow& wnd, std::unique_ptr& buffer); -}; + class BufferedPaintDC + { + BufferedPaintDC(wxWindow& wnd, std::unique_ptr& buffer) + }; */ @@ -77,7 +76,7 @@ public: oldRect_ = it->second; wxRect tmp = r; - tmp.Intersect(*oldRect_); //better safe than sorry + tmp.Intersect(*oldRect_); //better safe than sorry dc_.SetClippingRegion(tmp); // it->second = tmp; } @@ -113,6 +112,7 @@ private: #error we need this one! #endif +//CAVEAT: wxPaintDC on wxGTK/wxMAC does not implement SetLayoutDirection()!!! => GetLayoutDirection() == wxLayout_Default #if wxALWAYS_NATIVE_DOUBLE_BUFFER struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, std::optional& buffer) : wxPaintDC(&wnd) {} }; @@ -144,7 +144,7 @@ public: if (GetLayoutDirection() == wxLayout_RightToLeft) { paintDc_.SetLayoutDirection(wxLayout_LeftToRight); //workaround bug in wxDC::Blit() - SetLayoutDirection(wxLayout_LeftToRight); // + SetLayoutDirection(wxLayout_LeftToRight); // } const wxPoint origin = GetDeviceOrigin(); -- cgit