[1/4] gdiplus: GdipPathIterNextPathType stub added with test
Nikolay Sivov
bunglehead at gmail.com
Tue Aug 26 17:03:09 CDT 2008
Changelog:
- GdipPathIterNextPathType stub added with test
Please enter the commit message for your changes.
---
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*);
--
1.4.4.4
More information about the wine-patches
mailing list