mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Fix a coordinate problem that occurred with alphablend in DrawIconEx (32bpp mode only)
- Welcome back mixer icon in 32bpp mode! - Note for other invisible icons in that mode: 32bpp icon variants are most likely missing in the *.ico file; ReactOS image bpp conversion functions currently clear the alpha channel -> invisibility - Update function names in debug prints, remove duplicate code, slightly improve code readability svn path=/trunk/; revision=38607
This commit is contained in:
parent
3fec61d4a6
commit
06332c431c
1 changed files with 26 additions and 22 deletions
|
@ -1569,7 +1569,7 @@ UserDrawIconEx(
|
||||||
BitmapObj = BITMAPOBJ_LockBitmap(hbmOff);
|
BitmapObj = BITMAPOBJ_LockBitmap(hbmOff);
|
||||||
if (BitmapObj == NULL)
|
if (BitmapObj == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("GDIOBJ_LockObj() failed!\n");
|
DPRINT1("BITMAPOBJ_LockBitmap() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (PVOID)&bm);
|
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (PVOID)&bm);
|
||||||
|
@ -1591,7 +1591,7 @@ UserDrawIconEx(
|
||||||
hOldOffBrush = NtGdiSelectBrush(hdcOff, hbrFlickerFreeDraw);
|
hOldOffBrush = NtGdiSelectBrush(hdcOff, hbrFlickerFreeDraw);
|
||||||
if (!hOldOffBrush)
|
if (!hOldOffBrush)
|
||||||
{
|
{
|
||||||
DPRINT1("NtGdiSelectBitmap() failed!\n");
|
DPRINT1("NtGdiSelectBrush() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1622,21 +1622,18 @@ UserDrawIconEx(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoStretchBlt(hdcOff, (DoFlickerFree ? 0 : xLeft),
|
DoStretchBlt(hdcOff,
|
||||||
(DoFlickerFree ? 0 : yTop), cxWidth, cyHeight, hdcMem,
|
(DoFlickerFree || bAlpha ? 0 : xLeft),
|
||||||
0, 0, IconSize.cx, IconSize.cy,
|
(DoFlickerFree || bAlpha ? 0 : yTop),
|
||||||
((diFlags & DI_IMAGE) ? SRCAND : SRCCOPY), FALSE);
|
cxWidth,
|
||||||
|
cyHeight,
|
||||||
if (!hbmColor && (bmpMask.bmHeight == 2 * bmpMask.bmWidth)
|
hdcMem,
|
||||||
&& (diFlags & DI_IMAGE))
|
0,
|
||||||
{
|
0,
|
||||||
DoStretchBlt(hdcOff, (DoFlickerFree ? 0 : xLeft),
|
IconSize.cx,
|
||||||
(DoFlickerFree ? 0 : yTop), cxWidth, cyHeight, hdcMem,
|
IconSize.cy,
|
||||||
0, IconSize.cy, IconSize.cx, IconSize.cy, SRCINVERT,
|
((diFlags & DI_IMAGE) ? SRCAND : SRCCOPY),
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
diFlags &= ~DI_IMAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
NtGdiSelectBitmap(hdcMem, hOldMem);
|
NtGdiSelectBitmap(hdcMem, hOldMem);
|
||||||
}
|
}
|
||||||
|
@ -1645,9 +1642,16 @@ UserDrawIconEx(
|
||||||
{
|
{
|
||||||
hOldMem = NtGdiSelectBitmap(hdcMem, (hbmColor ? hbmColor : hbmMask));
|
hOldMem = NtGdiSelectBitmap(hdcMem, (hbmColor ? hbmColor : hbmMask));
|
||||||
|
|
||||||
DoStretchBlt(hdcOff, (DoFlickerFree ? 0 : xLeft),
|
DoStretchBlt(hdcOff,
|
||||||
(DoFlickerFree ? 0 : yTop), cxWidth, cyHeight, hdcMem,
|
(DoFlickerFree || bAlpha ? 0 : xLeft),
|
||||||
0, (hbmColor ? 0 : IconSize.cy), IconSize.cx, IconSize.cy,
|
(DoFlickerFree || bAlpha ? 0 : yTop),
|
||||||
|
cxWidth,
|
||||||
|
cyHeight,
|
||||||
|
hdcMem,
|
||||||
|
0,
|
||||||
|
(hbmColor ? 0 : IconSize.cy),
|
||||||
|
IconSize.cx,
|
||||||
|
IconSize.cy,
|
||||||
((diFlags & DI_MASK) ? SRCINVERT : SRCCOPY),
|
((diFlags & DI_MASK) ? SRCINVERT : SRCCOPY),
|
||||||
NULL != hbmColor);
|
NULL != hbmColor);
|
||||||
|
|
||||||
|
@ -1659,7 +1663,7 @@ UserDrawIconEx(
|
||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
BITMAPOBJ *BitmapObj = NULL;
|
BITMAPOBJ *BitmapObj = NULL;
|
||||||
PBYTE pBits = NULL;
|
PBYTE pBits = NULL;
|
||||||
BLENDFUNCTION BlendFunc;
|
BLENDFUNCTION BlendFunc;
|
||||||
DWORD Pixel;
|
DWORD Pixel;
|
||||||
BYTE Red, Green, Blue, Alpha;
|
BYTE Red, Green, Blue, Alpha;
|
||||||
DWORD Count = 0;
|
DWORD Count = 0;
|
||||||
|
@ -1668,7 +1672,7 @@ UserDrawIconEx(
|
||||||
BitmapObj = BITMAPOBJ_LockBitmap(hbmOff);
|
BitmapObj = BITMAPOBJ_LockBitmap(hbmOff);
|
||||||
if (BitmapObj == NULL)
|
if (BitmapObj == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("GDIOBJ_LockObj() failed!\n");
|
DPRINT1("BITMAPOBJ_LockBitmap() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (PVOID)&bm);
|
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (PVOID)&bm);
|
||||||
|
|
Loading…
Reference in a new issue