gdiplus: Implemented GdipSetCustomLineCapStrokeJoin + tests.
This commit is contained in:
parent
2848100e82
commit
5038845cf2
|
@ -175,15 +175,16 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
||||||
return NotImplemented;
|
return NotImplemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*FIXME: LineJoin completely ignored now */
|
||||||
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* custom,
|
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* custom,
|
||||||
GpLineJoin join)
|
GpLineJoin join)
|
||||||
{
|
{
|
||||||
static int calls;
|
if(!custom)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
if(!(calls++))
|
custom->join = join;
|
||||||
FIXME("not implemented\n");
|
|
||||||
|
|
||||||
return NotImplemented;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap* custom,
|
GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap* custom,
|
||||||
|
|
|
@ -87,12 +87,31 @@ static void test_linejoin(void)
|
||||||
expect(InvalidParameter, stat);
|
expect(InvalidParameter, stat);
|
||||||
stat = GdipGetCustomLineCapStrokeJoin(NULL, &join);
|
stat = GdipGetCustomLineCapStrokeJoin(NULL, &join);
|
||||||
expect(InvalidParameter, stat);
|
expect(InvalidParameter, stat);
|
||||||
|
stat = GdipSetCustomLineCapStrokeJoin(NULL, LineJoinBevel);
|
||||||
|
expect(InvalidParameter, stat);
|
||||||
|
|
||||||
/* LineJoinMiter is default */
|
/* LineJoinMiter is default */
|
||||||
stat = GdipGetCustomLineCapStrokeJoin(custom, &join);
|
stat = GdipGetCustomLineCapStrokeJoin(custom, &join);
|
||||||
expect(Ok, stat);
|
expect(Ok, stat);
|
||||||
expect(LineJoinMiter, join);
|
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);
|
GdipDeleteCustomLineCap(custom);
|
||||||
GdipDeletePath(path);
|
GdipDeletePath(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -327,6 +327,7 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap,
|
||||||
GpLineCap);
|
GpLineCap);
|
||||||
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*);
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*);
|
||||||
GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*);
|
GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*);
|
||||||
|
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin);
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*);
|
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*);
|
||||||
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB);
|
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB);
|
||||||
|
|
Loading…
Reference in New Issue