[PATCH 5/5] gdi32: Reselect font and pen when changing world transforms for enhanced metafiles.
Huw Davies
huw at codeweavers.com
Thu Apr 15 02:35:07 CDT 2021
On Wed, Apr 14, 2021 at 03:28:30PM +0800, Zhiyi Zhang wrote:
> Reselect font and pen into enhanced metafile device contexts after world transform is changed so
> that content can be drawn using the correct size. Also modifying the world transform for enhanced
> metafiles doesn't generate EMR_SELECTOBJECT records according to winedump outputs.
>
> Fix an issue that Tally may produce a print preview with a too large font or with a black side bar.
>
> Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
> ---
> dlls/gdi32/dc.c | 3 +-
> dlls/gdi32/enhmfdrv/dc.c | 78 ++++++++++++++++++++++++----
> dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 +
> dlls/gdi32/enhmfdrv/init.c | 1 +
> dlls/gdi32/enhmfdrv/objects.c | 2 +
> dlls/gdi32/tests/metafile.c | 1 -
> 6 files changed, 72 insertions(+), 14 deletions(-)
>
> diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
> index eb9dbf85668..74bf0a8dd50 100644
> --- a/dlls/gdi32/dc.c
> +++ b/dlls/gdi32/dc.c
> @@ -363,8 +363,7 @@ void DC_UpdateXforms( DC *dc )
>
> /* Reselect the font and pen back into the dc so that the size
> gets updated. */
> - if (linear_xform_cmp( &oldworld2vport, &dc->xformWorld2Vport ) &&
> - !GdiIsMetaFileDC(dc->hSelf))
> + if (linear_xform_cmp( &oldworld2vport, &dc->xformWorld2Vport ))
> {
What about wmf-style metafiles? We'll want to check those with a test.
Huw.
More information about the wine-devel
mailing list