Module: wine Branch: master Commit: 5038845cf21d2d8474b74cbaf21cb316a29c5b59 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5038845cf21d2d8474b74cbaf2...
Author: Nikolay Sivov bunglehead@gmail.com Date: Sat Jul 26 12:48:05 2008 +0400
gdiplus: Implemented GdipSetCustomLineCapStrokeJoin + tests.
---
dlls/gdiplus/customlinecap.c | 9 +++++---- dlls/gdiplus/tests/customlinecap.c | 19 +++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c index 429b144..721a4f5 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 c33ec6f..9f3e6f0 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 d9cebe8..37ef6e0 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);