Commit 40278137 authored by Justin Chevrier's avatar Justin Chevrier Committed by Alexandre Julliard

gdiplus: Add GdipGetPathGradientSurroundColorCount stub with tests.

parent 88b4263a
...@@ -1167,6 +1167,16 @@ GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient ...@@ -1167,6 +1167,16 @@ GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient
return NotImplemented; return NotImplemented;
} }
GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorCount(GpPathGradient *brush, INT *count)
{
TRACE("(%p, %p)\n", brush, count);
if (!brush || !count)
return InvalidParameter;
return NotImplemented;
}
GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient *brush, GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient *brush,
GpWrapMode *wrapmode) GpWrapMode *wrapmode)
{ {
......
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
@ stub GdipGetPathGradientPresetBlendCount @ stub GdipGetPathGradientPresetBlendCount
@ stdcall GdipGetPathGradientRect(ptr ptr) @ stdcall GdipGetPathGradientRect(ptr ptr)
@ stdcall GdipGetPathGradientRectI(ptr ptr) @ stdcall GdipGetPathGradientRectI(ptr ptr)
@ stub GdipGetPathGradientSurroundColorCount @ stdcall GdipGetPathGradientSurroundColorCount(ptr ptr)
@ stdcall GdipGetPathGradientSurroundColorsWithCount(ptr ptr ptr) @ stdcall GdipGetPathGradientSurroundColorsWithCount(ptr ptr ptr)
@ stub GdipGetPathGradientTransform @ stub GdipGetPathGradientTransform
@ stdcall GdipGetPathGradientWrapMode(ptr ptr) @ stdcall GdipGetPathGradientWrapMode(ptr ptr)
......
...@@ -646,6 +646,61 @@ static void test_linelinearblend(void) ...@@ -646,6 +646,61 @@ static void test_linelinearblend(void)
expect(Ok, status); expect(Ok, status);
} }
static void test_gradientsurroundcolorcount(void)
{
GpStatus status;
GpPathGradient *grad;
ARGB *color;
INT count = 3;
status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad);
expect(Ok, status);
color = GdipAlloc(sizeof(ARGB[3]));
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
expect(InvalidParameter, status);
GdipFree(color);
count = 2;
color = GdipAlloc(sizeof(ARGB[2]));
color[0] = 0x00ff0000;
color[1] = 0x0000ff00;
status = GdipSetPathGradientSurroundColorsWithCount(NULL, color, &count);
expect(InvalidParameter, status);
status = GdipSetPathGradientSurroundColorsWithCount(grad, NULL, &count);
expect(InvalidParameter, status);
/* WinXP crashes on this test */
if(0)
{
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, NULL);
expect(InvalidParameter, status);
}
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
todo_wine expect(Ok, status);
expect(2, count);
status = GdipGetPathGradientSurroundColorCount(NULL, &count);
expect(InvalidParameter, status);
status = GdipGetPathGradientSurroundColorCount(grad, NULL);
expect(InvalidParameter, status);
count = 0;
status = GdipGetPathGradientSurroundColorCount(grad, &count);
todo_wine expect(Ok, status);
todo_wine expect(2, count);
GdipFree(color);
GdipDeleteBrush((GpBrush*)grad);
}
START_TEST(brush) START_TEST(brush)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
...@@ -669,6 +724,7 @@ START_TEST(brush) ...@@ -669,6 +724,7 @@ START_TEST(brush)
test_gradientgetrect(); test_gradientgetrect();
test_lineblend(); test_lineblend();
test_linelinearblend(); test_linelinearblend();
test_gradientsurroundcolorcount();
GdiplusShutdown(gdiplusToken); GdiplusShutdown(gdiplusToken);
} }
...@@ -563,6 +563,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient*,REAL,REAL); ...@@ -563,6 +563,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient*,REAL,REAL);
GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*, GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*,
GDIPCONST ARGB*,INT*); GDIPCONST ARGB*,INT*);
GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient*,GpWrapMode); GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient*,GpWrapMode);
GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorCount(GpPathGradient*,INT*);
/* PathIterator */ /* PathIterator */
GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*); GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);
......
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