From 5279ad5b9f8d4d6aab9d7e57bfc0490201008be1 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 3 Nov 2014 08:59:37 +0100 Subject: [PATCH] d2d1: Implement d2d_gradient_GetGradientStopCount(). --- dlls/d2d1/brush.c | 8 ++++++-- dlls/d2d1/d2d1_private.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c index 6e46036af51..4d7a5ad8d9e 100644 --- a/dlls/d2d1/brush.c +++ b/dlls/d2d1/brush.c @@ -80,9 +80,11 @@ static void STDMETHODCALLTYPE d2d_gradient_GetFactory(ID2D1GradientStopCollectio static UINT32 STDMETHODCALLTYPE d2d_gradient_GetGradientStopCount(ID2D1GradientStopCollection *iface) { - FIXME("iface %p stub!\n", iface); + struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface); - return 0; + TRACE("iface %p.\n", iface); + + return gradient->stop_count; } static void STDMETHODCALLTYPE d2d_gradient_GetGradientStops(ID2D1GradientStopCollection *iface, @@ -124,6 +126,8 @@ void d2d_gradient_init(struct d2d_gradient *gradient, ID2D1RenderTarget *render_ gradient->ID2D1GradientStopCollection_iface.lpVtbl = &d2d_gradient_vtbl; gradient->refcount = 1; + + gradient->stop_count = stop_count; } static void d2d_brush_init(struct d2d_brush *brush, ID2D1RenderTarget *render_target, diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 2d1fea28e06..3fd3cdd7cb0 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -85,6 +85,8 @@ struct d2d_gradient { ID2D1GradientStopCollection ID2D1GradientStopCollection_iface; LONG refcount; + + UINT32 stop_count; }; void d2d_gradient_init(struct d2d_gradient *gradient, ID2D1RenderTarget *render_target,