On 23 November 2016 at 18:09, Nikolay Sivov nsivov@codeweavers.com wrote:
-static void STDMETHODCALLTYPE d2d_stroke_style_GetDashes(ID2D1StrokeStyle *iface, float *dashes, UINT32 count) +static void STDMETHODCALLTYPE d2d_stroke_style_GetDashes(ID2D1StrokeStyle *iface, float *dashes, UINT32 dash_count) {
- FIXME("iface %p, dashes %p, count %u stub!\n", iface, dashes, count);
- struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle(iface);
- TRACE("iface %p, dashes %p, count %u.\n", iface, dashes, dash_count);
- memcpy(dashes, style->dashes, min(style->dash_count, dash_count) * sizeof(*dashes));
- if (dash_count > style->dash_count)
memset(dashes, 0, (dash_count - style->dash_count) * sizeof(*dashes));
That doesn't look right.
On 24.11.2016 14:08, Henri Verbeet wrote:
On 23 November 2016 at 18:09, Nikolay Sivov nsivov@codeweavers.com wrote:
-static void STDMETHODCALLTYPE d2d_stroke_style_GetDashes(ID2D1StrokeStyle *iface, float *dashes, UINT32 count) +static void STDMETHODCALLTYPE d2d_stroke_style_GetDashes(ID2D1StrokeStyle *iface, float *dashes, UINT32 dash_count) {
- FIXME("iface %p, dashes %p, count %u stub!\n", iface, dashes, count);
- struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle(iface);
- TRACE("iface %p, dashes %p, count %u.\n", iface, dashes, dash_count);
- memcpy(dashes, style->dashes, min(style->dash_count, dash_count) * sizeof(*dashes));
- if (dash_count > style->dash_count)
memset(dashes, 0, (dash_count - style->dash_count) * sizeof(*dashes));
That doesn't look right.
Oh, right. That means GetGradientStops() is broken too. Are you okay with keeping memset() or it's better to explicitly set them to 0.0f?
On 24 November 2016 at 12:13, Nikolay Sivov bunglehead@gmail.com wrote:
Oh, right. That means GetGradientStops() is broken too. Are you okay with keeping memset() or it's better to explicitly set them to 0.0f?
Memset() is fine with me.