https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d85023c9c976ec002dcde…
commit d85023c9c976ec002dcde33514252678d2be79f8
Author: jimtabor <james.tabor(a)reactos.org>
AuthorDate: Fri Nov 24 17:22:43 2017 -0600
[GDI] - Add type for setting world transform modification modes.
References:
https://msdn.microsoft.com/en-us/library/cc230538.aspx
https://github.com/KDE/krita/blob/master/libs/vectorimage/libemf/EmfEnums.h
---
win32ss/gdi/gdi32/objects/coord.c | 3 +--
win32ss/gdi/ntgdi/coord.c | 2 +-
win32ss/gdi/ntgdi/path.c | 2 +-
win32ss/include/ntgdityp.h | 6 ++++++
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/win32ss/gdi/gdi32/objects/coord.c b/win32ss/gdi/gdi32/objects/coord.c
index 727d4bd4a7..2caa575352 100644
--- a/win32ss/gdi/gdi32/objects/coord.c
+++ b/win32ss/gdi/gdi32/objects/coord.c
@@ -302,8 +302,7 @@ SetWorldTransform(
_In_ HDC hdc,
_Out_ CONST XFORM *pxform)
{
- /* FIXME shall we add undoc #define MWT_SETXFORM 4 ?? */
- return ModifyWorldTransform(hdc, pxform, MWT_MAX+1);
+ return ModifyWorldTransform(hdc, pxform, MWT_SET);
}
diff --git a/win32ss/gdi/ntgdi/coord.c b/win32ss/gdi/ntgdi/coord.c
index 8d7be4e26c..58d236581b 100644
--- a/win32ss/gdi/ntgdi/coord.c
+++ b/win32ss/gdi/ntgdi/coord.c
@@ -480,7 +480,7 @@ GreModifyWorldTransform(
XFORMOBJ_iCombine(&xoDC, &xoDC, &xoSrc);
break;
- case MWT_MAX+1: // Must be MWT_SET????
+ case MWT_SET:
XFORMOBJ_vInit(&xoDC, &pdc->pdcattr->mxWorldToPage);
if (XFORMOBJ_iSetXform(&xoDC, pxform) == DDI_ERROR)
return FALSE;
diff --git a/win32ss/gdi/ntgdi/path.c b/win32ss/gdi/ntgdi/path.c
index 5a014a3e03..f4cc24951a 100644
--- a/win32ss/gdi/ntgdi/path.c
+++ b/win32ss/gdi/ntgdi/path.c
@@ -1529,7 +1529,7 @@ PATH_FillPath(
/* Go to GM_ADVANCED temporarily to restore the world transform */
graphicsMode = pdcattr->iGraphicsMode;
pdcattr->iGraphicsMode = GM_ADVANCED;
- GreModifyWorldTransform(dc, &xform, MWT_MAX+1);
+ GreModifyWorldTransform(dc, &xform, MWT_SET);
pdcattr->iGraphicsMode = graphicsMode;
return TRUE;
}
diff --git a/win32ss/include/ntgdityp.h b/win32ss/include/ntgdityp.h
index 7b54c323e8..4bf8aa92fa 100644
--- a/win32ss/include/ntgdityp.h
+++ b/win32ss/include/ntgdityp.h
@@ -170,6 +170,12 @@ typedef enum GDILoObjType
GDILoObjType_LO_METADC16_TYPE = 0x660000
} GDILOOBJTYPE, *PGDILOOBJTYPE;
+/**
+ World Transform modification modes
+ See [MS-EMF] Section 2.1.24
+*/
+#define MWT_SET 0x04
+
#define GdiWorldSpaceToPageSpace 0x203
#define GdiWorldSpaceToDeviceSpace 0x204
#define GdiPageSpaceToDeviceSpace 0x304