Fixed wxBufferedPaintDC for scrolled windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -81,9 +81,12 @@ public:
|
|||||||
wxASSERT_MSG( m_dc != 0,
|
wxASSERT_MSG( m_dc != 0,
|
||||||
_T("No underlying DC associated with wxBufferedDC (anymore)") );
|
_T("No underlying DC associated with wxBufferedDC (anymore)") );
|
||||||
|
|
||||||
|
wxCoord x, y;
|
||||||
|
GetDeviceOrigin(& x, & y);
|
||||||
|
|
||||||
m_dc->Blit( 0, 0,
|
m_dc->Blit( 0, 0,
|
||||||
m_buffer.GetWidth(), m_buffer.GetHeight(), this,
|
m_buffer.GetWidth(), m_buffer.GetHeight(), this,
|
||||||
0, 0 );
|
-x, -y );
|
||||||
m_dc = NULL;
|
m_dc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,8 +126,6 @@ public:
|
|||||||
wxBufferedPaintDC(wxWindow *window, const wxBitmap& buffer = wxNullBitmap)
|
wxBufferedPaintDC(wxWindow *window, const wxBitmap& buffer = wxNullBitmap)
|
||||||
: m_paintdc(window)
|
: m_paintdc(window)
|
||||||
{
|
{
|
||||||
window->PrepareDC( m_paintdc );
|
|
||||||
|
|
||||||
if( buffer != wxNullBitmap )
|
if( buffer != wxNullBitmap )
|
||||||
Init(&m_paintdc, buffer);
|
Init(&m_paintdc, buffer);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user