]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/dc.cpp
fixed TLWs resizing to invalidate the DFB surface used for painting
[wxWidgets.git] / 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,