]> git.saurik.com Git - wxWidgets.git/commitdiff
ROP 0x00AA0029 used for transparent area in DrawBitmap and Blit
authorGuillermo Rodriguez Garcia <guille@iies.es>
Thu, 10 Feb 2000 06:54:50 +0000 (06:54 +0000)
committerGuillermo Rodriguez Garcia <guille@iies.es>
Thu, 10 Feb 2000 06:54:50 +0000 (06:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index c720b36fa35d304be3ed4af3cd9bafa4e24680db..683d74d73b0ea1d8ac4e5989a44e855042116d0c 100644 (file)
@@ -688,7 +688,7 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
         bool ok = ::MaskBlt(GetHdc(), x, y, width, height,
                             hdcMem, 0, 0,
                             hbmpMask, 0, 0,
-                            MAKEROP4(SRCCOPY, SRCPAINT)) != 0;
+                            MAKEROP4(SRCCOPY, 0x00AA0029)) != 0;
         ::DeleteDC(hdcMem);
 
         if ( !ok )
@@ -697,6 +697,8 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
             // VZ: this is incorrect, Blit() doesn't (and can't) draw
             //     transparently, but it's still better than nothing at all
 
+            // GRG: Blit() *should* draw transparently when there is a mask.
+
             // Rather than reproduce wxDC::Blit, let's do it at the wxWin API level
             wxMemoryDC memDC;
             memDC.SelectObject(bmp);
@@ -1370,7 +1372,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
         success = ::MaskBlt(GetHdc(), xdest, ydest, width, height,
                             GetHdcOf(*source), xsrc, ysrc,
                             hbmpMask, 0, 0,
-                            MAKEROP4(PATCOPY, dwRop)) != 0;
+                            MAKEROP4(0x00AA0029, dwRop)) != 0;
 
         if ( hbrNew )
         {