Handle clipping regions with negative width or height in wxQt
This commit is contained in:
committed by
Vadim Zeitlin
parent
ce5301e4e6
commit
a130a59111
@@ -416,6 +416,17 @@ void wxQtDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if ( width < 0 )
|
||||||
|
{
|
||||||
|
width = -width;
|
||||||
|
x -= width - 1;
|
||||||
|
}
|
||||||
|
if ( height < 0 )
|
||||||
|
{
|
||||||
|
height = -height;
|
||||||
|
y -= height - 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_qtPainter->isActive())
|
if (m_qtPainter->isActive())
|
||||||
{
|
{
|
||||||
// Set QPainter clipping (intersection if not the first one)
|
// Set QPainter clipping (intersection if not the first one)
|
||||||
|
Reference in New Issue
Block a user