Commit bcbe1bcf authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

uxtheme: Use StretchBlt() when resizing a source image for tiling.

For example, when a theme part has a source image with 0xff00ff as transparent pixels and the sizing margin is larger than the destination, the source image is first resized to fit the destination, during which, StretchBlt() should be used instead of TransparentBlt() because the image should not be blended with the temporary memory device context. Fix group box background may be drawn in black. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 9c5fa40e
......@@ -779,8 +779,9 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
bmpSrcResized = CreateBitmap(srcSize.x, srcSize.y, 1, 32, NULL);
SelectObject(hdcSrc, bmpSrcResized);
/* Use ALPHABLEND_NONE because the image is getting resized, rather than blended with the target */
UXTHEME_StretchBlt(hdcSrc, 0, 0, srcSize.x, srcSize.y, hdcOrigSrc, rcSrc.left, rcSrc.top,
rcSrc.right - rcSrc.left, rcSrc.bottom - rcSrc.top, transparent, transparentcolor);
rcSrc.right - rcSrc.left, rcSrc.bottom - rcSrc.top, ALPHABLEND_NONE, 0);
rcSrc.left = 0;
rcSrc.top = 0;
......
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