From 8f6c45192d8612ad2372b6703cf2e7201ff340ba Mon Sep 17 00:00:00 2001 From: Haoyang Chen Date: Tue, 19 Jan 2021 15:48:15 +0300 Subject: [PATCH] d2d1: Fix text position in DrawText(). Signed-off-by: Nikolay Sivov Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard (cherry picked from commit f37c83452ebd909275b896bdc37f36155e1800ee) Signed-off-by: Michael Stefaniuc --- dlls/d2d1/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 3c8431ce8f4..a4583c1c65c 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1183,7 +1183,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if return; } - d2d_point_set(&origin, layout_rect->left, layout_rect->top); + d2d_point_set(&origin, min(layout_rect->left, layout_rect->right), min(layout_rect->top, layout_rect->bottom)); ID2D1DeviceContext_DrawTextLayout(iface, origin, text_layout, brush, options); IDWriteTextLayout_Release(text_layout); }