Aric Stewart : comctl32: Trying to blend an image without a mask causes problem, especially if the background is white.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 18 08:04:01 CDT 2007


Module: wine
Branch: master
Commit: df0d77b007a8187fb344ae3201a0d93697501421
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=df0d77b007a8187fb344ae3201a0d93697501421

Author: Aric Stewart <aric at codeweavers.com>
Date:   Thu May 17 10:56:39 2007 -0500

comctl32: Trying to blend an image without a mask causes problem, especially if the background is white.

---

 dlls/comctl32/imagelist.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 0c23d19..3c9e89b 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -1192,8 +1192,13 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
 
         hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour));
         PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY );
-        BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, pt.x, pt.y, SRCAND );
-        BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCPAINT );
+        if (himl->hbmMask)
+        {
+            BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, pt.x, pt.y, SRCAND );
+            BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCPAINT );
+        }
+        else
+            BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCCOPY);
         DeleteObject (SelectObject (hImageDC, hOldBrush));
     }
 




More information about the wine-cvs mailing list