2024-10-24 13:33:36 -07:00
|
|
|
From 91a8656c92eafa768869c83f4b1242ab9fa7b8f3 Mon Sep 17 00:00:00 2001
|
2024-10-17 13:34:05 -07:00
|
|
|
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
|
|
|
Date: Wed, 22 Nov 2023 11:51:23 +0300
|
2024-10-24 13:33:36 -07:00
|
|
|
Subject: [PATCH] win32u: NtGdiExtTextOutW() should translate x,y from logical
|
|
|
|
to device units at the last step.
|
2024-10-17 13:34:05 -07:00
|
|
|
|
|
|
|
Bug: https://bugs.winehq.org/show_bug.cgi?id=33190
|
|
|
|
|
|
|
|
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
|
|
|
---
|
2024-10-24 13:33:36 -07:00
|
|
|
dlls/win32u/font.c | 15 +++++++--------
|
|
|
|
1 file changed, 7 insertions(+), 8 deletions(-)
|
2024-10-17 13:34:05 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c
|
2024-10-24 13:33:36 -07:00
|
|
|
index 8fbd8dc3f01..c57bedb2a3a 100644
|
2024-10-17 13:34:05 -07:00
|
|
|
--- a/dlls/win32u/font.c
|
|
|
|
+++ b/dlls/win32u/font.c
|
|
|
|
@@ -5972,12 +5972,6 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *lpr
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
- pt.x = x;
|
|
|
|
- pt.y = y;
|
|
|
|
- lp_to_dp(dc, &pt, 1);
|
|
|
|
- x = pt.x;
|
|
|
|
- y = pt.y;
|
|
|
|
-
|
|
|
|
char_extra = dc->attr->char_extra;
|
|
|
|
if (char_extra && lpDx && NtGdiGetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASPRINTER)
|
|
|
|
char_extra = 0; /* Printer drivers don't add char_extra if lpDx is supplied */
|
|
|
|
@@ -6074,8 +6068,6 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *lpr
|
|
|
|
width = desired[1];
|
|
|
|
}
|
|
|
|
|
|
|
|
- tm.tmAscent = abs(INTERNAL_YWSTODS(dc, tm.tmAscent));
|
|
|
|
- tm.tmDescent = abs(INTERNAL_YWSTODS(dc, tm.tmDescent));
|
|
|
|
switch( align & (TA_LEFT | TA_RIGHT | TA_CENTER) )
|
|
|
|
{
|
|
|
|
case TA_LEFT:
|
2024-10-24 13:33:36 -07:00
|
|
|
@@ -6137,12 +6129,19 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *lpr
|
|
|
|
text_box.bottom = y + tm.tmDescent;
|
|
|
|
|
|
|
|
if (flags & ETO_CLIPPED) intersect_rect( &text_box, &text_box, &rc );
|
|
|
|
+ lp_to_dp(dc, (POINT *)&text_box, 2);
|
|
|
|
if (!IsRectEmpty( &text_box ))
|
|
|
|
physdev->funcs->pExtTextOut( physdev, 0, 0, ETO_OPAQUE, &text_box, NULL, 0, NULL );
|
|
|
|
}
|
2024-10-17 13:34:05 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ pt.x = x;
|
|
|
|
+ pt.y = y;
|
|
|
|
+ lp_to_dp(dc, &pt, 1);
|
|
|
|
+ x = pt.x;
|
|
|
|
+ y = pt.y;
|
|
|
|
+
|
|
|
|
ret = physdev->funcs->pExtTextOut( physdev, x, y, (flags & ~ETO_OPAQUE), &rc,
|
|
|
|
str, count, (INT*)deltas );
|
|
|
|
|
|
|
|
--
|
2024-10-24 13:33:36 -07:00
|
|
|
2.45.2
|
2024-10-17 13:34:05 -07:00
|
|
|
|