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>
This commit is contained in:
Haoyang Chen 2021-01-19 15:48:15 +03:00 committed by Alexandre Julliard
parent 41e49d4596
commit f37c83452e
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}