user32: Use the correct rop when blitting an icon in DrawIconEx.
This commit is contained in:
parent
a59d79c9a6
commit
4c03fd0138
|
@ -2275,8 +2275,7 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
|
||||||
oldFg = SetTextColor( hdc, RGB(0,0,0) );
|
oldFg = SetTextColor( hdc, RGB(0,0,0) );
|
||||||
oldBg = SetBkColor( hdc, RGB(255,255,255) );
|
oldBg = SetBkColor( hdc, RGB(255,255,255) );
|
||||||
|
|
||||||
if (((flags & DI_MASK) && !(flags & DI_IMAGE)) ||
|
if ((flags & DI_MASK) && !has_alpha)
|
||||||
((flags & DI_MASK) && !has_alpha))
|
|
||||||
{
|
{
|
||||||
hAndBits = CreateBitmap ( ptr->nWidth, ptr->nHeight, 1, 1, ptr + 1 );
|
hAndBits = CreateBitmap ( ptr->nWidth, ptr->nHeight, 1, 1, ptr + 1 );
|
||||||
if (hAndBits)
|
if (hAndBits)
|
||||||
|
@ -2341,13 +2340,14 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
DWORD rop = (flags & DI_MASK) ? SRCINVERT : SRCCOPY;
|
||||||
hBitTemp = SelectObject( hMemDC, hXorBits );
|
hBitTemp = SelectObject( hMemDC, hXorBits );
|
||||||
if (DoOffscreen)
|
if (DoOffscreen)
|
||||||
StretchBlt (hDC_off, 0, 0, cxWidth, cyWidth,
|
StretchBlt (hDC_off, 0, 0, cxWidth, cyWidth,
|
||||||
hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCPAINT);
|
hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, rop);
|
||||||
else
|
else
|
||||||
StretchBlt (hdc, x0, y0, cxWidth, cyWidth,
|
StretchBlt (hdc, x0, y0, cxWidth, cyWidth,
|
||||||
hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCPAINT);
|
hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, rop);
|
||||||
SelectObject( hMemDC, hBitTemp );
|
SelectObject( hMemDC, hBitTemp );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1190,15 +1190,12 @@ static void test_DrawIconEx(void)
|
||||||
check_DrawIconEx(hdcDst, FALSE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00000000, 0x00000000, __LINE__);
|
check_DrawIconEx(hdcDst, FALSE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00000000, 0x00000000, __LINE__);
|
||||||
check_DrawIconEx(hdcDst, TRUE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, __LINE__);
|
check_DrawIconEx(hdcDst, TRUE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, __LINE__);
|
||||||
|
|
||||||
todo_wine
|
|
||||||
{
|
|
||||||
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, DI_IMAGE, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, DI_IMAGE, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
||||||
check_DrawIconEx(hdcDst, TRUE, 0x00A0B0C0, 32, DI_IMAGE, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
check_DrawIconEx(hdcDst, TRUE, 0x00A0B0C0, 32, DI_IMAGE, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
||||||
}
|
|
||||||
|
|
||||||
/* Test normal drawing */
|
/* Test normal drawing */
|
||||||
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
||||||
todo_wine check_DrawIconEx(hdcDst, TRUE, 0x00A0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x003F4F5F, 0x003F4F5F, __LINE__);
|
check_DrawIconEx(hdcDst, TRUE, 0x00A0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x003F4F5F, 0x003F4F5F, __LINE__);
|
||||||
check_DrawIconEx(hdcDst, FALSE, 0xFFA0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
check_DrawIconEx(hdcDst, FALSE, 0xFFA0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
|
||||||
|
|
||||||
/* Test alpha blending */
|
/* Test alpha blending */
|
||||||
|
|
Loading…
Reference in New Issue