mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-12 06:10:55 +00:00
Fix TOOLBAR_DrawMasked to correctly use image list mask.
This commit is contained in:
parent
0c3af0ba58
commit
1076286020
|
@ -654,8 +654,7 @@ static void TOOLBAR_DrawMasked(HIMAGELIST himl, int index, HDC hdc, INT x, INT y
|
|||
|
||||
/* Create src image */
|
||||
hdcImage = CreateCompatibleDC(hdc);
|
||||
hbmImage = CreateBitmap(cx, cy, GetDeviceCaps(hdc,PLANES),
|
||||
GetDeviceCaps(hdc,BITSPIXEL), NULL);
|
||||
hbmImage = CreateCompatibleBitmap(hdc, cx, cy);
|
||||
SelectObject(hdcImage, hbmImage);
|
||||
ImageList_DrawEx(himl, index, hdcImage, 0, 0, cx, cy,
|
||||
RGB(0xff, 0xff, 0xff), RGB(0,0,0), draw_flags);
|
||||
|
@ -666,8 +665,8 @@ static void TOOLBAR_DrawMasked(HIMAGELIST himl, int index, HDC hdc, INT x, INT y
|
|||
SelectObject(hdcMask, hbmMask);
|
||||
|
||||
/* Remove the background and all white pixels */
|
||||
SetBkColor(hdcImage, ImageList_GetBkColor(himl));
|
||||
BitBlt(hdcMask, 0, 0, cx, cy, hdcImage, 0, 0, SRCCOPY);
|
||||
ImageList_DrawEx(himl, index, hdcMask, 0, 0, cx, cy,
|
||||
RGB(0xff, 0xff, 0xff), RGB(0,0,0), ILD_MASK);
|
||||
SetBkColor(hdcImage, RGB(0xff, 0xff, 0xff));
|
||||
BitBlt(hdcMask, 0, 0, cx, cy, hdcImage, 0, 0, NOTSRCERASE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue