Commit 8f1853a3 authored by Alexandre Julliard's avatar Alexandre Julliard

comctl32/imagelist: Clear pixels that fall outside the mask when generating an alpha channel.

parent 9479fbfd
...@@ -205,6 +205,8 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count, ...@@ -205,6 +205,8 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
for (j = n * width; j < (n + 1) * width; j++) for (j = n * width; j < (n + 1) * width; j++)
if (!mask_bits || !((mask_bits[i * mask_width + j / 8] << (j % 8)) & 0x80)) if (!mask_bits || !((mask_bits[i * mask_width + j / 8] << (j % 8)) & 0x80))
bits[i * bm.bmWidth + j] |= 0xff000000; bits[i * bm.bmWidth + j] |= 0xff000000;
else
bits[i * bm.bmWidth + j] = 0;
if (hdcMask) StretchBlt( himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, if (hdcMask) StretchBlt( himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy,
hdcMask, n * width, 0, width, height, SRCCOPY ); hdcMask, n * width, 0, width, height, SRCCOPY );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment