[PATCH 3/3] gdiplus: Implement GdipSetPathGradientSurroundColorsWithCount and GdipGetPathGradientSurroundColorCount
Justin Chevrier
jchevrier at gmail.com
Sat Mar 27 16:55:28 CDT 2010
---
dlls/gdiplus/brush.c | 12 ++++++------
dlls/gdiplus/gdiplus_private.h | 2 ++
dlls/gdiplus/tests/brush.c | 6 +++---
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 8994b87..b1fd615 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -1174,7 +1174,9 @@ GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorCount(GpPathGradient *brush,
if (!brush || !count)
return InvalidParameter;
- return NotImplemented;
+ *count = brush->surroundcolorcount;
+
+ return Ok;
}
GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient *brush,
@@ -1544,18 +1546,16 @@ GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient *grad,
GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient
*grad, GDIPCONST ARGB *argb, INT *count)
{
- static int calls;
-
TRACE("(%p,%p,%p)\n", grad, argb, count);
if(!grad || !argb || !count || (*count <= 0) ||
(*count > grad->pathdata.Count))
return InvalidParameter;
- if(!(calls++))
- FIXME("not implemented\n");
+ grad->surroundcolorcount = *count;
+ grad->surroundcolors = argb;
- return NotImplemented;
+ return Ok;
}
GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient *grad,
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index ca1cba6..f84750b 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -151,6 +151,8 @@ struct GpPathGradient{
GpBrush brush;
PathData pathdata;
ARGB centercolor;
+ INT surroundcolorcount;
+ GDIPCONST ARGB* surroundcolors;
GpWrapMode wrap;
BOOL gamma;
GpPointF center;
diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c
index 0effcf4..820cb4e 100644
--- a/dlls/gdiplus/tests/brush.c
+++ b/dlls/gdiplus/tests/brush.c
@@ -683,7 +683,7 @@ static void test_gradientsurroundcolorcount(void)
}
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
- todo_wine expect(Ok, status);
+ expect(Ok, status);
expect(2, count);
status = GdipGetPathGradientSurroundColorCount(NULL, &count);
@@ -694,8 +694,8 @@ static void test_gradientsurroundcolorcount(void)
count = 0;
status = GdipGetPathGradientSurroundColorCount(grad, &count);
- todo_wine expect(Ok, status);
- todo_wine expect(2, count);
+ expect(Ok, status);
+ expect(2, count);
GdipFree(color);
GdipDeleteBrush((GpBrush*)grad);
--
1.6.5.rc1
More information about the wine-patches
mailing list