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

Alexandre Julliard julliard at winehq.org
Wed Dec 1 15:23:49 CST 2021


Module: wine
Branch: master
Commit: bcbe1bcff33d9c49e3c20adcc00c84c179a5e7cb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bcbe1bcff33d9c49e3c20adcc00c84c179a5e7cb

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Tue Nov 30 14:50:33 2021 +0800

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: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/uxtheme/draw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c
index bf294ed3cc8..04ea1e79df9 100644
--- a/dlls/uxtheme/draw.c
+++ b/dlls/uxtheme/draw.c
@@ -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;




More information about the wine-cvs mailing list