Commit 48dfe437 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d2d1: Implement d2d_radial_gradient_brush_GetGradientStopCollection().

parent 5aef3d63
...@@ -622,7 +622,10 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_Release(ID2D1RadialGrad ...@@ -622,7 +622,10 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_Release(ID2D1RadialGrad
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount) if (!refcount)
{
ID2D1GradientStopCollection_Release(&brush->u.radial.gradient->ID2D1GradientStopCollection_iface);
d2d_brush_destroy(brush); d2d_brush_destroy(brush);
}
return refcount; return refcount;
} }
...@@ -744,9 +747,11 @@ static float STDMETHODCALLTYPE d2d_radial_gradient_brush_GetRadiusY(ID2D1RadialG ...@@ -744,9 +747,11 @@ static float STDMETHODCALLTYPE d2d_radial_gradient_brush_GetRadiusY(ID2D1RadialG
static void STDMETHODCALLTYPE d2d_radial_gradient_brush_GetGradientStopCollection(ID2D1RadialGradientBrush *iface, static void STDMETHODCALLTYPE d2d_radial_gradient_brush_GetGradientStopCollection(ID2D1RadialGradientBrush *iface,
ID2D1GradientStopCollection **gradient) ID2D1GradientStopCollection **gradient)
{ {
FIXME("iface %p, gradient %p stub!\n", iface, gradient); struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface);
TRACE("iface %p, gradient %p.\n", iface, gradient);
*gradient = NULL; ID2D1GradientStopCollection_AddRef(*gradient = &brush->u.radial.gradient->ID2D1GradientStopCollection_iface);
} }
static const struct ID2D1RadialGradientBrushVtbl d2d_radial_gradient_brush_vtbl = static const struct ID2D1RadialGradientBrushVtbl d2d_radial_gradient_brush_vtbl =
...@@ -780,6 +785,8 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory, ...@@ -780,6 +785,8 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
d2d_brush_init(b, factory, D2D_BRUSH_TYPE_RADIAL, brush_desc, (ID2D1BrushVtbl *)&d2d_radial_gradient_brush_vtbl); d2d_brush_init(b, factory, D2D_BRUSH_TYPE_RADIAL, brush_desc, (ID2D1BrushVtbl *)&d2d_radial_gradient_brush_vtbl);
b->u.radial.gradient = unsafe_impl_from_ID2D1GradientStopCollection(gradient);
ID2D1GradientStopCollection_AddRef(&b->u.radial.gradient->ID2D1GradientStopCollection_iface);
b->u.radial.centre = gradient_desc->center; b->u.radial.centre = gradient_desc->center;
b->u.radial.offset = gradient_desc->gradientOriginOffset; b->u.radial.offset = gradient_desc->gradientOriginOffset;
......
...@@ -241,6 +241,7 @@ struct d2d_brush ...@@ -241,6 +241,7 @@ struct d2d_brush
} linear; } linear;
struct struct
{ {
struct d2d_gradient *gradient;
D2D1_POINT_2F centre; D2D1_POINT_2F centre;
D2D1_POINT_2F offset; D2D1_POINT_2F offset;
} radial; } radial;
......
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