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
This commit is contained in:
Paul Cornett
2019-11-23 08:41:31 -08:00
parent e763ae96ac
commit fee30940b6

View File

@@ -355,7 +355,9 @@ void wxPaintDCImpl::DestroyClippingRegion()
int x, y, w, h;
m_clip.GetBox(x, y, w, h);
cairo_t* cr = static_cast<cairo_t*>(GetCairoContext());
cairo_rectangle(cr, x, y, w, h);
cairo_rectangle(cr,
DeviceToLogicalX(x), DeviceToLogicalY(y),
DeviceToLogicalXRel(w), DeviceToLogicalYRel(h));
cairo_clip(cr);
}
//-----------------------------------------------------------------------------