Fix wxClientDC::Clear() for scrolled windows in wxMSW.
Take the DC origin into account when clearing a window DC and not only a memory one. Closes #2048. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
41569662e3
commit
afb49a224b
@ -694,11 +694,13 @@ void wxMSWDCImpl::Clear()
|
||||
if (!m_selectedBitmap.IsOk())
|
||||
return;
|
||||
|
||||
rect.left = -m_deviceOriginX; rect.top = -m_deviceOriginY;
|
||||
rect.right = m_selectedBitmap.GetWidth()-m_deviceOriginX;
|
||||
rect.bottom = m_selectedBitmap.GetHeight()-m_deviceOriginY;
|
||||
rect.left = rect.top = 0;
|
||||
rect.right = m_selectedBitmap.GetWidth();
|
||||
rect.bottom = m_selectedBitmap.GetHeight();
|
||||
}
|
||||
|
||||
::OffsetRect(&rect, -m_deviceOriginX, -m_deviceOriginY);
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
(void) ::SetMapMode(GetHdc(), MM_TEXT);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user