gdiplus: Implemented GdipSetCustomLineCapStrokeJoin + tests.

This commit is contained in:
Nikolay Sivov 2008-07-26 12:48:05 +04:00 committed by Alexandre Julliard
parent 2848100e82
commit 5038845cf2
3 changed files with 25 additions and 4 deletions

View file

@ -175,15 +175,16 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap* custom,
return NotImplemented;
}
/*FIXME: LineJoin completely ignored now */
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* custom,
GpLineJoin join)
{
static int calls;
if(!custom)
return InvalidParameter;
if(!(calls++))
FIXME("not implemented\n");
custom->join = join;
return NotImplemented;
return Ok;
}
GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap* custom,

View file

@ -87,12 +87,31 @@ static void test_linejoin(void)
expect(InvalidParameter, stat);
stat = GdipGetCustomLineCapStrokeJoin(NULL, &join);
expect(InvalidParameter, stat);
stat = GdipSetCustomLineCapStrokeJoin(NULL, LineJoinBevel);
expect(InvalidParameter, stat);
/* LineJoinMiter is default */
stat = GdipGetCustomLineCapStrokeJoin(custom, &join);
expect(Ok, stat);
expect(LineJoinMiter, join);
/* set/get */
stat = GdipSetCustomLineCapStrokeJoin(custom, LineJoinBevel);
expect(Ok, stat);
stat = GdipGetCustomLineCapStrokeJoin(custom, &join);
expect(Ok, stat);
expect(LineJoinBevel, join);
stat = GdipSetCustomLineCapStrokeJoin(custom, LineJoinRound);
expect(Ok, stat);
stat = GdipGetCustomLineCapStrokeJoin(custom, &join);
expect(Ok, stat);
expect(LineJoinRound, join);
stat = GdipSetCustomLineCapStrokeJoin(custom, LineJoinMiterClipped);
expect(Ok, stat);
stat = GdipGetCustomLineCapStrokeJoin(custom, &join);
expect(Ok, stat);
expect(LineJoinMiterClipped, join);
GdipDeleteCustomLineCap(custom);
GdipDeletePath(path);
}

View file

@ -327,6 +327,7 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap,
GpLineCap);
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*);
GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*);
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin);
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*);
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB);