Module: wine Branch: master Commit: f37c83452ebd909275b896bdc37f36155e1800ee URL: https://source.winehq.org/git/wine.git/?a=commit;h=f37c83452ebd909275b896bdc...
Author: Haoyang Chen chenhaoyang@uniontech.com Date: Tue Jan 19 15:48:15 2021 +0300
d2d1: Fix text position in DrawText().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 5f04c3aa833..bd3af3d16ff 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1189,7 +1189,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); }