Module: wine Branch: master Commit: 47a81f5a0c7eaafd6f392f2eea74e9cd42f1f227 URL: http://source.winehq.org/git/wine.git/?a=commit;h=47a81f5a0c7eaafd6f392f2eea...
Author: Vincent Povirk vincent@codeweavers.com Date: Tue Apr 28 18:18:26 2009 -0500
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 20a440c..74e7764 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -1151,14 +1151,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)