Vincent Povirk : gdiplus: Add stub GdipGetPathGradientPath with tests.

Alexandre Julliard julliard at winehq.org
Tue Mar 13 13:50:34 CDT 2012


Module: wine
Branch: master
Commit: 116665d7fc9e4cf45afe1011e438316029ab4df7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=116665d7fc9e4cf45afe1011e438316029ab4df7

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Mon Feb 20 14:02:37 2012 -0600

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 deletions(-)

diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 963aa74..c601c10 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 9398658..b7d82da 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 5eed607..296cf0f 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 6792004..9a8c5ff 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);




More information about the wine-cvs mailing list