]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxBufferedPaintDC for scrolled windows
authorJulian Smart <julian@anthemion.co.uk>
Wed, 2 Mar 2005 08:16:48 +0000 (08:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 2 Mar 2005 08:16:48 +0000 (08:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dcbuffer.h

index 9cd95e0ac3e2e2f048051352ea63c62292146317..6cd63b8d60ee4cbc774510289649d10cb50f97f5 100644 (file)
@@ -81,9 +81,12 @@ public:
         wxASSERT_MSG( m_dc != 0,
                       _T("No underlying DC associated with wxBufferedDC (anymore)") );
 
+        wxCoord x, y;
+        GetDeviceOrigin(& x, & y);
+
         m_dc->Blit( 0, 0,
                     m_buffer.GetWidth(), m_buffer.GetHeight(), this,
-                    0, 0 );
+                    -x, -y );
         m_dc = NULL;
     }
 
@@ -123,8 +126,6 @@ public:
     wxBufferedPaintDC(wxWindow *window, const wxBitmap& buffer = wxNullBitmap)
         : m_paintdc(window)
     {
-        window->PrepareDC( m_paintdc );
-
         if( buffer != wxNullBitmap )
             Init(&m_paintdc, buffer);
         else