Fix wxDCClipper
Initial clipping box needs to be stored in device coordinates to allow restoring it properly if wxDC logical coordinates were changed in the meantime. Closes #23083.
This commit is contained in:
parent
09521f81e9
commit
eb630a0781
1 changed files with 2 additions and 1 deletions
|
|
@ -1510,7 +1510,7 @@ public:
|
|||
{
|
||||
m_dc.DestroyClippingRegion();
|
||||
if ( m_restoreOld )
|
||||
m_dc.SetClippingRegion(m_oldClipRect);
|
||||
m_dc.SetDeviceClippingRegion(m_oldClipRect);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -1518,6 +1518,7 @@ private:
|
|||
void Init(const wxRect& r)
|
||||
{
|
||||
m_restoreOld = m_dc.GetClippingBox(m_oldClipRect);
|
||||
m_oldClipRect = wxRect(m_dc.LogicalToDevice(m_oldClipRect.GetPosition()), m_dc.LogicalToDeviceRel(m_oldClipRect.GetSize()));
|
||||
m_dc.SetClippingRegion(r);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue