]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed incorrect passing of bitmap dimensions in DoBlit
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 14 Sep 2006 16:48:56 +0000 (16:48 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 14 Sep 2006 16:48:56 +0000 (16:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/dc.cpp

index c10d8b692b667026c7cd7dd15ae00b36cbc93335..312969a018b31029ebe15515035feb41d2b45595 100644 (file)
@@ -1433,17 +1433,19 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
     /* scale/translate size and position */
     wxCoord xx = XLOG2DEV(xdest);
     wxCoord yy = YLOG2DEV(ydest);
-    wxCoord ww = XLOG2DEVREL(width);
-    wxCoord hh = YLOG2DEVREL(height);
 
     if ( source->m_isMemDC )
     {
         wxMemoryDC *memDC = (wxMemoryDC*) source;
-        DoDrawSubBitmap(memDC->GetSelectedObject(), xsrc, ysrc, ww, hh,
+        DoDrawSubBitmap(memDC->GetSelectedObject(),
+                        xsrc, ysrc, width, height,
                         xdest, ydest, rop, useMask);
     }
     else
     {
+        wxCoord ww = XLOG2DEVREL(width);
+        wxCoord hh = YLOG2DEVREL(height);
+
         m_MGLDC->makeCurrent(); // will go away with MGL6.0
         m_MGLDC->bitBlt(*source->GetMGLDC(),
                         xsrc, ysrc, xsrc + ww, ysrc + hh,