]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied second part of patch #1570448, use the device origin for where
authorRobin Dunn <robin@alldunn.com>
Fri, 6 Oct 2006 00:31:18 +0000 (00:31 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 6 Oct 2006 00:31:18 +0000 (00:31 +0000)
to clear

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index 339811ed3df144bfb30b8bfeca4e0b6088b01205..03375ff1083a7e81509d36956401417ffd14df68 100644 (file)
@@ -554,9 +554,9 @@ void wxDC::Clear()
         if (!m_selectedBitmap.Ok())
             return;
 
-        rect.left = 0; rect.top = 0;
-        rect.right = m_selectedBitmap.GetWidth();
-        rect.bottom = m_selectedBitmap.GetHeight();
+        rect.left = -m_deviceOriginX; rect.top = -m_deviceOriginY;
+        rect.right = m_selectedBitmap.GetWidth()-m_deviceOriginX;
+        rect.bottom = m_selectedBitmap.GetHeight()-m_deviceOriginY;
     }
 
 #ifndef __WXWINCE__