Author: jimtabor
Date: Sun Nov 11 03:18:21 2012
New Revision: 57699
URL:
http://svn.reactos.org/svn/reactos?rev=57699&view=rev
Log:
[Win32k]
- Implement Gdi32 counterpart SetStretchBltMode for Win32k.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/dc.h
trunk/reactos/win32ss/gdi/ntgdi/dcutil.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dc.h?rev…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dc.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dc.h [iso-8859-1] Sun Nov 11 03:18:21 2012
@@ -173,6 +173,7 @@
VOID FASTCALL DCU_SetDcUndeletable(HDC);
BOOL FASTCALL IntSetDefaultRegion(PDC);
ULONG TranslateCOLORREF(PDC pdc, COLORREF crColor);
+int FASTCALL GreSetStretchBltMode(HDC hdc, int iStretchMode);
Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcutil.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] Sun Nov 11 03:18:21 2012
@@ -94,6 +94,29 @@
DC_UnlockDc(pdc);
return crOldColor;
+}
+
+int
+FASTCALL
+GreSetStretchBltMode(HDC hDC, int iStretchMode)
+{
+ PDC pdc;
+ PDC_ATTR pdcattr;
+ INT oSMode = 0;
+
+ pdc = DC_LockDc(hDC);
+ if (pdc)
+ {
+ pdcattr = pdc->pdcattr;
+ oSMode = pdcattr->lStretchBltMode;
+ pdcattr->lStretchBltMode = iStretchMode;
+
+ // Wine returns an error here. We set the default.
+ if ((iStretchMode <= 0) || (iStretchMode > MAXSTRETCHBLTMODE)) iStretchMode
= WHITEONBLACK;
+
+ pdcattr->jStretchBltMode = iStretchMode;
+ }
+ return oSMode;
}
VOID