From 8fcae2d6ed6b3fd580a87ba4488adfcdc6a04d6b Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Thu, 10 Feb 2000 06:54:50 +0000 Subject: [PATCH] ROP 0x00AA0029 used for transparent area in DrawBitmap and Blit git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index c720b36fa3..683d74d73b 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -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 ) { -- 2.45.2