From f3985ca9e7fbeba479f449a66009d984f965524b Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Tue, 28 Apr 2009 18:18:26 -0500 Subject: [PATCH] gdiplus: implement GdipGetLineBlend --- dlls/gdiplus/brush.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index a591fee..7f07a96 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -1150,14 +1150,18 @@ GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient *brush, GpStatus WINGDIPAPI GdipGetLineBlend(GpLineGradient *brush, REAL *factors, REAL *positions, INT count) { - static int calls; - TRACE("(%p, %p, %p, %i)\n", brush, factors, positions, count); - if(!(calls++)) - FIXME("not implemented\n"); + if (!brush || !factors || !positions || count <= 0) + return InvalidParameter; - return NotImplemented; + if (count < brush->blendcount) + return InsufficientBuffer; + + memcpy(factors, brush->blendfac, brush->blendcount * sizeof(REAL)); + memcpy(positions, brush->blendpos, brush->blendcount * sizeof(REAL)); + + return Ok; } GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient *brush, INT *count) -- 1.5.4.3