diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c index 429b1441eaf..721a4f5e460 100644 --- a/dlls/gdiplus/customlinecap.c +++ b/dlls/gdiplus/customlinecap.c @@ -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, diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index c33ec6f7156..9f3e6f0f337 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -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); } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index d9cebe89824..37ef6e0287e 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -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);