[3/4] user32/cursoricon.c: Multiple Fixes/Improvements for DrawIconEx
Wilfried Pasquazzo
wilfried.pasquazzo at gmail.com
Fri Sep 25 12:14:27 CDT 2009
Best regards,
Wilfried Pasquazzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090925/5b5ff830/attachment-0001.htm>
-------------- next part --------------
From ad53a7bb1d18342711e132846ef479d13cb69be1 Mon Sep 17 00:00:00 2001
From: Wilfried Pasquazzo <wilfried.pasquazzo at gmail.com>
Date: Fri, 25 Sep 2009 17:55:41 +0000
Subject: Make DrawIconEx 2 additional tests (now passes all tests)
---
dlls/user32/cursoricon.c | 9 ++++++++-
dlls/user32/tests/cursoricon.c | 7 ++-----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 777e43a..8ffe600 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -2411,12 +2411,19 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
hXorBits = CreateBitmap( ptr->nWidth, ptr->nHeight, ptr->bPlanes, ptr->bBitsPerPixel, xorBitmapBits);
hBitTemp = SelectObject( hMemDC, hXorBits );
+
+ UINT bltFlag = 0;
+ if ( flags & DI_MASK )
+ bltFlag = SRCINVERT;
+ else
+ bltFlag = SRCCOPY;
+
if (DoOffscreen)
StretchBlt (hDC_off, 0, 0, cxWidth, cyWidth,
hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCPAINT);
else
StretchBlt (hdc, x0, y0, cxWidth, cyWidth,
- hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCINVERT);
+ hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, bltFlag);
SelectObject( hMemDC, hBitTemp );
DeleteObject( hXorBits );
}
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index 6092e5c..e1ebb0e 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -1190,11 +1190,8 @@ static void test_DrawIconEx(void)
check_DrawIconEx(hdcDst, FALSE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00000000, 0x00000000, __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, TRUE, 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__);
/* Test normal drawing */
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, DI_NORMAL, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
--
1.6.3.3
More information about the wine-patches
mailing list