X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0b15381d1ebac677ae281f5e864ab3d7f66eff5..f6e9a8189cfd9189418d6c0976a8a07f3bcd914b:/include/wx/dcbuffer.h diff --git a/include/wx/dcbuffer.h b/include/wx/dcbuffer.h index 0de48cdc10..9cd95e0ac3 100644 --- a/include/wx/dcbuffer.h +++ b/include/wx/dcbuffer.h @@ -14,7 +14,7 @@ #include "wx/dcmemory.h" #include "wx/dcclient.h" - +#include "wx/window.h" // ---------------------------------------------------------------------------- // Double buffering helper. @@ -81,9 +81,9 @@ public: wxASSERT_MSG( m_dc != 0, _T("No underlying DC associated with wxBufferedDC (anymore)") ); - m_dc->Blit( m_dc->DeviceToLogicalX(0), m_dc->DeviceToLogicalY(0), + m_dc->Blit( 0, 0, m_buffer.GetWidth(), m_buffer.GetHeight(), this, - DeviceToLogicalX(0), DeviceToLogicalY(0) ); + 0, 0 ); m_dc = NULL; } @@ -123,6 +123,8 @@ public: wxBufferedPaintDC(wxWindow *window, const wxBitmap& buffer = wxNullBitmap) : m_paintdc(window) { + window->PrepareDC( m_paintdc ); + if( buffer != wxNullBitmap ) Init(&m_paintdc, buffer); else