[PATCH 2/4] d2d1: Pass inline object effect through rendering context
Nikolay Sivov
nsivov at codeweavers.com
Thu Aug 24 06:25:05 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/d2d1/render_target.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/d2d1/render_target.c b/dlls/d2d1/render_target.c
index 2ac62e4d46..42fd4b6632 100644
--- a/dlls/d2d1/render_target.c
+++ b/dlls/d2d1/render_target.c
@@ -1982,10 +1982,22 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawStrikethrough(IDWriteText
static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawInlineObject(IDWriteTextRenderer *iface, void *ctx,
float origin_x, float origin_y, IDWriteInlineObject *object, BOOL is_sideways, BOOL is_rtl, IUnknown *effect)
{
+ struct d2d_draw_text_layout_ctx *context = ctx;
+ ID2D1Brush *brush;
+ HRESULT hr;
+
TRACE("iface %p, ctx %p, origin_x %.8e, origin_y %.8e, object %p, is_sideways %#x, is_rtl %#x, effect %p.\n",
iface, ctx, origin_x, origin_y, object, is_sideways, is_rtl, effect);
- return IDWriteInlineObject_Draw(object, ctx, iface, origin_x, origin_y, is_sideways, is_rtl, effect);
+ brush = context->brush;
+ context->brush = d2d_draw_get_text_brush(context, effect);
+
+ hr = IDWriteInlineObject_Draw(object, ctx, iface, origin_x, origin_y, is_sideways, is_rtl, effect);
+
+ ID2D1Brush_Release(context->brush);
+ context->brush = brush;
+
+ return hr;
}
static const struct IDWriteTextRendererVtbl d2d_text_renderer_vtbl =
--
2.14.1
More information about the wine-patches
mailing list