mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
d2d1: Use drawing effect for underlines.
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:
parent
8b2ba27c86
commit
ec1957c359
1 changed files with 7 additions and 1 deletions
|
@ -1679,6 +1679,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawUnderline(IDWriteTextRend
|
|||
const D2D1_MATRIX_3X2_F *m = &render_target->drawing_state.transform;
|
||||
struct d2d_draw_text_layout_ctx *context = ctx;
|
||||
float min_thickness;
|
||||
ID2D1Brush *brush;
|
||||
D2D1_RECT_F rect;
|
||||
|
||||
TRACE("iface %p, ctx %p, baseline_origin_x %.8e, baseline_origin_y %.8e, underline %p, effect %p\n",
|
||||
|
@ -1692,7 +1693,12 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawUnderline(IDWriteTextRend
|
|||
rect.right = baseline_origin_x + underline->width;
|
||||
rect.bottom = baseline_origin_y + underline->offset + max(underline->thickness, min_thickness);
|
||||
|
||||
ID2D1RenderTarget_FillRectangle(&render_target->ID2D1RenderTarget_iface, &rect, context->brush);
|
||||
brush = d2d_draw_get_text_brush(context, effect);
|
||||
|
||||
ID2D1RenderTarget_FillRectangle(&render_target->ID2D1RenderTarget_iface, &rect, brush);
|
||||
|
||||
ID2D1Brush_Release(brush);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue