Author: akhaldi
Date: Sat Apr 25 12:04:21 2015
New Revision: 67405
URL:
http://svn.reactos.org/svn/reactos?rev=67405&view=rev
Log:
[UXTHEME] Apply Wine commit c6b4b4b by Mark Harmstone: Fix colour errors in
UXTHEME_StretchBlt.
Modified:
trunk/reactos/dll/win32/uxtheme/draw.c
Modified: trunk/reactos/dll/win32/uxtheme/draw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?r…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Sat Apr 25 12:04:21 2015
@@ -274,22 +274,33 @@
255, /* SourceConstantAlpha */
AC_SRC_ALPHA /* AlphaFormat */
};
+
+ BOOL ret = TRUE;
+ int old_stretch_mode;
+ POINT old_brush_org;
+
+ old_stretch_mode = SetStretchBltMode(hdcDst, HALFTONE);
+ SetBrushOrgEx(hdcDst, nXOriginDst, nYOriginDst, &old_brush_org);
+
if (transparent == ALPHABLEND_BINARY) {
/* Ensure we don't pass any negative values to TransparentBlt */
- return TransparentBlt(hdcDst, nXOriginDst, nYOriginDst, abs(nWidthDst),
abs(nHeightDst),
+ ret = TransparentBlt(hdcDst, nXOriginDst, nYOriginDst, abs(nWidthDst),
abs(nHeightDst),
hdcSrc, nXOriginSrc, nYOriginSrc, abs(nWidthSrc),
abs(nHeightSrc),
transcolor);
- }
- if ((transparent == ALPHABLEND_NONE) ||
+ } else if ((transparent == ALPHABLEND_NONE) ||
!AlphaBlend(hdcDst, nXOriginDst, nYOriginDst, nWidthDst, nHeightDst,
hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
blendFunc))
{
- return StretchBlt(hdcDst, nXOriginDst, nYOriginDst, nWidthDst, nHeightDst,
+ ret = StretchBlt(hdcDst, nXOriginDst, nYOriginDst, nWidthDst, nHeightDst,
hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
SRCCOPY);
}
- return TRUE;
+
+ SetBrushOrgEx(hdcDst, old_brush_org.x, old_brush_org.y, NULL);
+ SetStretchBltMode(hdcDst, old_stretch_mode);
+
+ return ret;
}
/***********************************************************************