From fee30940b697a4c1ce7c838673ccc94c64565638 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 23 Nov 2019 08:41:31 -0800 Subject: [PATCH] Take wxDC transformations into account when resetting clipping with GTK3 The paint update region is in device coordinates, it needs to be converted to current logical coordinates to apply correctly. See #18584, #18560 --- src/gtk/dc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 35815f5cce..35db75c0e7 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -355,7 +355,9 @@ void wxPaintDCImpl::DestroyClippingRegion() int x, y, w, h; m_clip.GetBox(x, y, w, h); cairo_t* cr = static_cast(GetCairoContext()); - cairo_rectangle(cr, x, y, w, h); + cairo_rectangle(cr, + DeviceToLogicalX(x), DeviceToLogicalY(y), + DeviceToLogicalXRel(w), DeviceToLogicalYRel(h)); cairo_clip(cr); } //-----------------------------------------------------------------------------