Commit 2b5928b2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Pass drawing effect to renderer in DrawGlyphRun().

parent c0fb6f43
......@@ -184,6 +184,7 @@ struct layout_effective_run {
UINT32 start; /* relative text position, 0 means first text position of a nominal run */
UINT32 length; /* length in codepoints that this run covers */
UINT32 glyphcount; /* total glyph count in this run */
IUnknown *effect; /* original reference is kept only at range level */
FLOAT origin_x; /* baseline X position */
FLOAT origin_y; /* baseline Y position */
FLOAT align_dx; /* adjustment from text alignment */
......@@ -1106,6 +1107,7 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const
for (i = 0; i < length; i++)
run->clustermap[i] = r->u.regular.clustermap[start + i] - r->u.regular.clustermap[start];
run->effect = params->effect;
list_add_tail(&layout->eruns, &run->entry);
/* Strikethrough style is guaranteed to be consistent within effective run,
......@@ -2979,7 +2981,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
This->measuringmode,
&glyph_run,
&descr,
NULL);
run->effect);
}
/* 2. Inline objects */
......
......@@ -2998,7 +2998,7 @@ static void test_SetDrawingEffect(void)
flush_sequence(sequences, RENDERER_ID);
hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok_sequence(sequences, RENDERER_ID, draweffect2_seq, "effect draw test 2", TRUE);
ok_sequence(sequences, RENDERER_ID, draweffect2_seq, "effect draw test 2", FALSE);
IDWriteTextLayout_Release(layout);
/* Inline object - effect set for same range */
......
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