From 59a9c1cf96b452ec20c419fc26ac88324396a654 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 27 Aug 2008 02:03:09 +0400 Subject: [PATCH] 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 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index c5b7c2f87d0..b45f917d812 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 d6a68506335..b60e5f65325 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 * * 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 6995b189699..79ce879238d 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 251d81d8f3d..3af06927559 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*);