gdiplus: Implemented GdipGetCustomLineCapBaseInset + test.
This commit is contained in:
parent
5038845cf2
commit
6c6e8f489e
|
@ -156,12 +156,12 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap* custom,
|
||||||
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
||||||
REAL* inset)
|
REAL* inset)
|
||||||
{
|
{
|
||||||
static int calls;
|
if(!custom || !inset)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
if(!(calls++))
|
*inset = custom->inset;
|
||||||
FIXME("not implemented\n");
|
|
||||||
|
|
||||||
return NotImplemented;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
|
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
|
||||||
|
#define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got)
|
||||||
|
|
||||||
static void test_constructor_destructor(void)
|
static void test_constructor_destructor(void)
|
||||||
{
|
{
|
||||||
|
@ -116,6 +117,38 @@ static void test_linejoin(void)
|
||||||
GdipDeletePath(path);
|
GdipDeletePath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_inset(void)
|
||||||
|
{
|
||||||
|
GpCustomLineCap *custom;
|
||||||
|
GpPath *path;
|
||||||
|
REAL inset;
|
||||||
|
GpStatus stat;
|
||||||
|
|
||||||
|
stat = GdipCreatePath(FillModeAlternate, &path);
|
||||||
|
expect(Ok, stat);
|
||||||
|
stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0);
|
||||||
|
expect(Ok, stat);
|
||||||
|
|
||||||
|
stat = GdipCreateCustomLineCap(NULL, path, LineCapFlat, 0.0, &custom);
|
||||||
|
expect(Ok, stat);
|
||||||
|
|
||||||
|
/* NULL args */
|
||||||
|
stat = GdipGetCustomLineCapBaseInset(NULL, NULL);
|
||||||
|
expect(InvalidParameter, stat);
|
||||||
|
stat = GdipGetCustomLineCapBaseInset(NULL, &inset);
|
||||||
|
expect(InvalidParameter, stat);
|
||||||
|
stat = GdipGetCustomLineCapBaseInset(custom, NULL);
|
||||||
|
expect(InvalidParameter, stat);
|
||||||
|
/* valid args */
|
||||||
|
inset = (REAL)0xdeadbeef;
|
||||||
|
stat = GdipGetCustomLineCapBaseInset(custom, &inset);
|
||||||
|
expect(Ok, stat);
|
||||||
|
expectf(0.0, inset);
|
||||||
|
|
||||||
|
GdipDeleteCustomLineCap(custom);
|
||||||
|
GdipDeletePath(path);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(customlinecap)
|
START_TEST(customlinecap)
|
||||||
{
|
{
|
||||||
struct GdiplusStartupInput gdiplusStartupInput;
|
struct GdiplusStartupInput gdiplusStartupInput;
|
||||||
|
@ -130,6 +163,7 @@ START_TEST(customlinecap)
|
||||||
|
|
||||||
test_constructor_destructor();
|
test_constructor_destructor();
|
||||||
test_linejoin();
|
test_linejoin();
|
||||||
|
test_inset();
|
||||||
|
|
||||||
GdiplusShutdown(gdiplusToken);
|
GdiplusShutdown(gdiplusToken);
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,6 +326,7 @@ GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*);
|
||||||
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap,
|
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap,
|
||||||
GpLineCap);
|
GpLineCap);
|
||||||
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*);
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*);
|
||||||
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap*,REAL*);
|
||||||
GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*);
|
GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*);
|
||||||
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin);
|
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue