Commit a62a9fcc authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Fix underline/strikethrough position adjustment caused by text alignment.

parent 3fa5ebd0
...@@ -3151,7 +3151,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface, ...@@ -3151,7 +3151,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
IDWriteTextRenderer_DrawUnderline(renderer, IDWriteTextRenderer_DrawUnderline(renderer,
context, context,
/* horizontal underline always grows from left to right, width is always added to origin regardless of run direction */ /* horizontal underline always grows from left to right, width is always added to origin regardless of run direction */
(is_run_rtl(u->run) ? u->run->origin_x - u->run->width : u->run->origin_x) + run->align_dx + origin_x, (is_run_rtl(u->run) ? u->run->origin_x - u->run->width : u->run->origin_x) + u->run->align_dx + origin_x,
SNAP_COORD(u->run->origin_y + origin_y), SNAP_COORD(u->run->origin_y + origin_y),
&u->u, &u->u,
u->run->effect); u->run->effect);
...@@ -3161,7 +3161,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface, ...@@ -3161,7 +3161,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
LIST_FOR_EACH_ENTRY(s, &This->strikethrough, struct layout_strikethrough, entry) { LIST_FOR_EACH_ENTRY(s, &This->strikethrough, struct layout_strikethrough, entry) {
IDWriteTextRenderer_DrawStrikethrough(renderer, IDWriteTextRenderer_DrawStrikethrough(renderer,
context, context,
s->run->origin_x + run->align_dx + origin_x, s->run->origin_x + s->run->align_dx + origin_x,
SNAP_COORD(s->run->origin_y + origin_y), SNAP_COORD(s->run->origin_y + origin_y),
&s->s, &s->s,
s->run->effect); s->run->effect);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment