Handle clipping regions with negative width or height in wxQt

This commit is contained in:
Jay Nabonne
2019-01-21 12:35:55 +00:00
committed by Vadim Zeitlin
parent ce5301e4e6
commit a130a59111

View File

@@ -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)