gdi32: Support MWT_SET in NtGdiModifyWorldTransform.
It's not defined in public headers, but it's documented in EMF spec. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
36bfd7cd71
commit
eb5c039f42
|
@ -366,6 +366,11 @@ BOOL WINAPI NtGdiModifyWorldTransform( HDC hdc, const XFORM *xform, DWORD mode )
|
|||
case MWT_RIGHTMULTIPLY:
|
||||
ret = CombineTransform( &dc->xformWorld2Wnd, &dc->xformWorld2Wnd, xform );
|
||||
break;
|
||||
case MWT_SET:
|
||||
ret = dc->attr->graphics_mode == GM_ADVANCED &&
|
||||
xform->eM11 * xform->eM22 != xform->eM12 * xform->eM21;
|
||||
if (ret) dc->xformWorld2Wnd = *xform;
|
||||
break;
|
||||
}
|
||||
if (ret) DC_UpdateXforms( dc );
|
||||
release_dc_ptr( dc );
|
||||
|
|
|
@ -385,6 +385,7 @@ static void test_dc_layout(void)
|
|||
static void test_modify_world_transform(void)
|
||||
{
|
||||
HDC hdc = GetDC(0);
|
||||
XFORM xform, xform2;
|
||||
int ret;
|
||||
|
||||
ret = SetGraphicsMode(hdc, GM_ADVANCED);
|
||||
|
@ -399,6 +400,27 @@ static void test_modify_world_transform(void)
|
|||
ret = ModifyWorldTransform(hdc, NULL, MWT_RIGHTMULTIPLY);
|
||||
ok(!ret, "ret = %d\n", ret);
|
||||
|
||||
xform.eM11 = 2;
|
||||
xform.eM12 = 0;
|
||||
xform.eM21 = 0;
|
||||
xform.eM22 = 1;
|
||||
xform.eDx = xform.eDy = 0;
|
||||
ret = ModifyWorldTransform(hdc, &xform, 4);
|
||||
ok(ret, "ModifyWorldTransform failed\n");
|
||||
|
||||
memset(&xform2, 0xcc, sizeof(xform2));
|
||||
ret = GetWorldTransform(hdc, &xform2);
|
||||
ok(ret, "GetWorldTransform failed\n");
|
||||
ok(!memcmp(&xform, &xform2, sizeof(xform)), "unexpected xform\n");
|
||||
|
||||
xform.eM11 = 1;
|
||||
xform.eM12 = 1;
|
||||
xform.eM21 = 1;
|
||||
xform.eM22 = 1;
|
||||
xform.eDx = xform.eDy = 0;
|
||||
ret = ModifyWorldTransform(hdc, &xform, 4);
|
||||
ok(!ret, "ModifyWorldTransform succeeded\n");
|
||||
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,8 @@ enum
|
|||
NtGdiSetMapMode = 8,
|
||||
};
|
||||
|
||||
#define MWT_SET 4
|
||||
|
||||
/* structs not compatible with native Windows */
|
||||
#ifdef __WINESRC__
|
||||
|
||||
|
|
Loading…
Reference in New Issue