gdi32: Update metafile world transform immediately in winnt mode.
commit083e61fddf90ade32a119d5b6bf84d27adefc589
authorAndrew Eikum <aeikum@codeweavers.com>
Fri, 25 Aug 2017 13:10:44 +0000 (25 08:10 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 25 Aug 2017 16:30:18 +0000 (25 18:30 +0200)
treefa8aa08990df60a7e600426e7dfb0fb14ac53f2e
parent7860d11e6cd93d8a1c463be79f783385dcda45eb
gdi32: Update metafile world transform immediately in winnt mode.

The Chrome browser print function implements their own handling for
EMR_MODIFYWORLDTRANSFORM which calls ModifyWorldTransform on the HDC
directly without ever calling PlayEnhMetaFileRecord. In Wine, this
transformation would get discarded when the callback function returned,
causing the page to be printed at the wrong scale.

Tests show that the transform is updated immediately during
PlayEnhMetaFileRecord. In addition, a modified transform persists
between callbacks until PlayEnhMetaFileRecord is called on a relevant
type of callback, at which point the transform is reverted before
playing back the record.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/gdi32/enhmetafile.c
dlls/gdi32/tests/metafile.c