gdiplus: GdipPathIterNextPathType stub added with test.

This commit is contained in:
Nikolay Sivov 2008-08-27 02:03:09 +04:00 committed by Alexandre Julliard
parent 1def017ecd
commit 59a9c1cf96
4 changed files with 44 additions and 1 deletions

View File

@ -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)

View File

@ -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)
{

View File

@ -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);
}

View File

@ -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*);