From b5780cbc5b0dd557b35cbdc982cdda91e0b13ba3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 4 Aug 2021 11:23:17 +0200 Subject: [PATCH] gdi32: Use ntgdi interface for GetTransform and GetWorldTransform. Signed-off-by: Jacek Caban Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/gdi32/dc.c | 18 ++---------------- dlls/gdi32/enhmfdrv/bitblt.c | 2 +- dlls/gdi32/gdi32.spec | 2 +- dlls/gdi32/gdidc.c | 8 ++++++++ 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 8c03392c513..70dbade998a 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -881,21 +881,7 @@ INT WINAPI SetGraphicsMode( HDC hdc, INT mode ) /*********************************************************************** - * GetWorldTransform (GDI32.@) - */ -BOOL WINAPI GetWorldTransform( HDC hdc, LPXFORM xform ) -{ - DC * dc; - if (!xform) return FALSE; - if (!(dc = get_dc_ptr( hdc ))) return FALSE; - *xform = dc->xformWorld2Wnd; - release_dc_ptr( dc ); - return TRUE; -} - - -/*********************************************************************** - * GetTransform (GDI32.@) + * NtGdiGetTransform (win32u.@) * * Undocumented * @@ -911,7 +897,7 @@ BOOL WINAPI GetWorldTransform( HDC hdc, LPXFORM xform ) * xform [O] The xform. * */ -BOOL WINAPI GetTransform( HDC hdc, DWORD which, XFORM *xform ) +BOOL WINAPI NtGdiGetTransform( HDC hdc, DWORD which, XFORM *xform ) { BOOL ret = TRUE; DC *dc = get_dc_ptr( hdc ); diff --git a/dlls/gdi32/enhmfdrv/bitblt.c b/dlls/gdi32/enhmfdrv/bitblt.c index 2ef2081be71..ca3455459e5 100644 --- a/dlls/gdi32/enhmfdrv/bitblt.c +++ b/dlls/gdi32/enhmfdrv/bitblt.c @@ -85,7 +85,7 @@ static BOOL emfdrv_stretchblt( PHYSDEV dev_dst, struct bitblt_coords *dst, PHYSD emr_stretchblt->cySrc = src->log_height; } emr->dwRop = rop; - GetTransform(dev_src->hdc, 0x204, &emr->xformSrc); + NtGdiGetTransform( dev_src->hdc, 0x204, &emr->xformSrc ); emr->crBkColorSrc = GetBkColor(dev_src->hdc); emr->iUsageSrc = DIB_RGB_COLORS; emr->offBmiSrc = emr_size; diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 41f27fe7f57..049a61d4ab2 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -361,7 +361,7 @@ @ stdcall GetTextFaceW(long long ptr) @ stdcall GetTextMetricsA(long ptr) @ stdcall GetTextMetricsW(long ptr) -@ stdcall GetTransform(long long ptr) +@ stdcall GetTransform(long long ptr) NtGdiGetTransform @ stdcall GetViewportExtEx(long ptr) @ stdcall GetViewportOrgEx(long ptr) @ stdcall GetWinMetaFileBits(long long ptr long long) diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index 1b9057b33e0..baa6c199b87 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -418,6 +418,14 @@ BOOL WINAPI GetViewportOrgEx( HDC hdc, POINT *point ) return TRUE; } +/*********************************************************************** + * GetWorldTransform (GDI32.@) + */ +BOOL WINAPI GetWorldTransform( HDC hdc, XFORM *xform ) +{ + return NtGdiGetTransform( hdc, 0x203, xform ); +} + /*********************************************************************** * SetStretchBltMode (GDI32.@) */