[PATCH 4/5] d2d1: Implement d2d_gradient_GetGradientStopCount().
Henri Verbeet
hverbeet at codeweavers.com
Mon Nov 3 01:59:37 CST 2014
---
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 6e46036..4d7a5ad 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 2d1fea2..3fd3cdd 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,
--
1.7.10.4
More information about the wine-patches
mailing list