Nikolay Sivov : gdiplus: GdipPathIterNextPathType stub added with test.

Alexandre Julliard julliard at winehq.org
Wed Aug 27 08:24:14 CDT 2008


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Wed Aug 27 02:03:09 2008 +0400

gdiplus: GdipPathIterNextPathType stub added with test.

---

 dlls/gdiplus/gdiplus.spec         |    2 +-
 dlls/gdiplus/pathiterator.c       |   13 +++++++++++++
 dlls/gdiplus/tests/pathiterator.c |   29 +++++++++++++++++++++++++++++
 include/gdiplusflat.h             |    1 +
 4 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index c5b7c2f..b45f917 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -458,7 +458,7 @@
 @ stdcall GdipPathIterIsValid(ptr ptr)
 @ stdcall GdipPathIterNextMarker(ptr ptr ptr ptr)
 @ stdcall GdipPathIterNextMarkerPath(ptr ptr ptr)
-@ stub GdipPathIterNextPathType
+@ stdcall GdipPathIterNextPathType(ptr ptr ptr ptr ptr)
 @ stdcall GdipPathIterNextSubpath(ptr ptr ptr ptr ptr)
 @ stdcall GdipPathIterNextSubpathPath(ptr ptr ptr ptr)
 @ stdcall GdipPathIterRewind(ptr)
diff --git a/dlls/gdiplus/pathiterator.c b/dlls/gdiplus/pathiterator.c
index d6a6850..b60e5f6 100644
--- a/dlls/gdiplus/pathiterator.c
+++ b/dlls/gdiplus/pathiterator.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2007 Google (Evan Stade)
+ * Copyright (C) 2008 Nikolay Sivov <bunglehead at gmail dot com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -26,6 +27,9 @@
 
 #include "gdiplus.h"
 #include "gdiplus_private.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
 
 GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator **iterator, GpPath* path)
 {
@@ -262,6 +266,15 @@ GpStatus WINGDIPAPI GdipPathIterIsValid(GpPathIterator* iterator, BOOL* valid)
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipPathIterNextPathType(GpPathIterator* iter, INT* result,
+    BYTE* type, INT* start, INT* end)
+{
+    if(!iter || !result || !type || !start || !end)
+        return InvalidParameter;
+
+    return NotImplemented;
+}
+
 GpStatus WINGDIPAPI GdipPathIterNextSubpathPath(GpPathIterator* iter, INT* result,
     GpPath* path, BOOL* closed)
 {
diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c
index 6995b18..79ce879 100644
--- a/dlls/gdiplus/tests/pathiterator.c
+++ b/dlls/gdiplus/tests/pathiterator.c
@@ -476,6 +476,34 @@ static void test_nextsubpath(void)
     GdipDeletePath(path);
 }
 
+static void test_nextpathtype(void)
+{
+    GpPath *path;
+    GpPathIterator *iter;
+    GpStatus stat;
+    INT start, end, result;
+    BYTE type;
+
+    GdipCreatePath(FillModeAlternate, &path);
+    GdipCreatePathIter(&iter, path);
+
+    /* NULL arguments */
+    stat = GdipPathIterNextPathType(NULL, NULL, NULL, NULL, NULL);
+    expect(InvalidParameter, stat);
+    stat = GdipPathIterNextPathType(iter, NULL, NULL, NULL, NULL);
+    expect(InvalidParameter, stat);
+    stat = GdipPathIterNextPathType(iter, &result, NULL, NULL, NULL);
+    expect(InvalidParameter, stat);
+    stat = GdipPathIterNextPathType(iter, NULL, &type, NULL, NULL);
+    expect(InvalidParameter, stat);
+    stat = GdipPathIterNextPathType(iter, NULL, NULL, &start, &end);
+    expect(InvalidParameter, stat);
+    stat = GdipPathIterNextPathType(iter, NULL, &type, &start, &end);
+    expect(InvalidParameter, stat);
+
+    GdipDeletePath(path);
+}
+
 START_TEST(pathiterator)
 {
     struct GdiplusStartupInput gdiplusStartupInput;
@@ -496,6 +524,7 @@ START_TEST(pathiterator)
     test_isvalid();
     test_nextsubpathpath();
     test_nextsubpath();
+    test_nextpathtype();
 
     GdiplusShutdown(gdiplusToken);
 }
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 251d81d..3af0692 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -336,6 +336,7 @@ GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,
     INT,INT);
 GpStatus WINGDIPAPI GdipPathIterNextMarker(GpPathIterator*,INT*,INT*,INT*);
 GpStatus WINGDIPAPI GdipPathIterNextMarkerPath(GpPathIterator*,INT*,GpPath*);
+GpStatus WINGDIPAPI GdipPathIterNextPathType(GpPathIterator*,INT*,BYTE*,INT*,INT*);
 GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL*);
 GpStatus WINGDIPAPI GdipPathIterNextSubpathPath(GpPathIterator*,INT*,GpPath*,BOOL*);
 GpStatus WINGDIPAPI GdipPathIterRewind(GpPathIterator*);




More information about the wine-cvs mailing list