From a130a59111353c5277abcb37605845ae7d5b143e Mon Sep 17 00:00:00 2001 From: Jay Nabonne Date: Mon, 21 Jan 2019 12:35:55 +0000 Subject: [PATCH] Handle clipping regions with negative width or height in wxQt --- src/qt/dc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qt/dc.cpp b/src/qt/dc.cpp index 2d91673124..35dec4b0ac 100644 --- a/src/qt/dc.cpp +++ b/src/qt/dc.cpp @@ -416,6 +416,17 @@ void wxQtDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, } else { + if ( width < 0 ) + { + width = -width; + x -= width - 1; + } + if ( height < 0 ) + { + height = -height; + y -= height - 1; + } + if (m_qtPainter->isActive()) { // Set QPainter clipping (intersection if not the first one)