From 116665d7fc9e4cf45afe1011e438316029ab4df7 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 20 Feb 2012 14:02:37 -0600 Subject: [PATCH] gdiplus: Add stub GdipGetPathGradientPath with tests. --- dlls/gdiplus/brush.c | 12 ++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/tests/brush.c | 29 +++++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 963aa74220d..c601c1003a5 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -1019,6 +1019,18 @@ GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient *grad, return Ok; } +GpStatus WINGDIPAPI GdipGetPathGradientPath(GpPathGradient *grad, GpPath *path) +{ + static int calls; + + TRACE("(%p, %p)\n", grad, path); + + if (!(calls++)) + FIXME("not implemented\n"); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient *grad, INT *count) { diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 93986584824..b7d82daf958 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -316,7 +316,7 @@ 316 stdcall GdipGetPathGradientCenterPointI(ptr ptr) 317 stdcall GdipGetPathGradientFocusScales(ptr ptr ptr) 318 stdcall GdipGetPathGradientGammaCorrection(ptr ptr) -319 stub GdipGetPathGradientPath +319 stdcall GdipGetPathGradientPath(ptr ptr) 320 stdcall GdipGetPathGradientPointCount(ptr ptr) 321 stdcall GdipGetPathGradientPresetBlend(ptr ptr ptr long) 322 stdcall GdipGetPathGradientPresetBlendCount(ptr ptr) diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index 5eed6074f4b..296cf0feb63 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -824,6 +824,34 @@ static void test_gradientsurroundcolorcount(void) GdipDeleteBrush((GpBrush*)grad); } +static void test_pathgradientpath(void) +{ + GpStatus status; + GpPath *path=NULL; + GpPathGradient *grad=NULL; + + status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad); + expect(Ok, status); + + status = GdipGetPathGradientPath(grad, NULL); + expect(NotImplemented, status); + + status = GdipCreatePath(FillModeWinding, &path); + expect(Ok, status); + + status = GdipGetPathGradientPath(NULL, path); + expect(NotImplemented, status); + + status = GdipGetPathGradientPath(grad, path); + expect(NotImplemented, status); + + status = GdipDeletePath(path); + expect(Ok, status); + + status = GdipDeleteBrush((GpBrush*)grad); + expect(Ok, status); +} + START_TEST(brush) { struct GdiplusStartupInput gdiplusStartupInput; @@ -848,6 +876,7 @@ START_TEST(brush) test_lineblend(); test_linelinearblend(); test_gradientsurroundcolorcount(); + test_pathgradientpath(); GdiplusShutdown(gdiplusToken); } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 67920042937..9a8c5ff9b9c 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -554,6 +554,7 @@ GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI(GpPathGradient*,GpPoint*); GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*); GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*); +GpStatus WINGDIPAPI GdipGetPathGradientPath(GpPathGradient*,GpPath*); GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*); GpStatus WINGDIPAPI GdipSetPathGradientPresetBlend(GpPathGradient*, GDIPCONST ARGB*,GDIPCONST REAL*,INT); -- 2.11.4.GIT