Module: wine Branch: master Commit: 200652075be4406ad1e104657e672849bab6c7c7 URL: https://gitlab.winehq.org/wine/wine/-/commit/200652075be4406ad1e104657e67284...
Author: Bartosz Kosiorek gang65@poczta.onet.pl Date: Mon Nov 7 17:35:55 2022 +0100
gdiplus: Add GdipSetCustomLineCapBaseInset implementation.
---
dlls/gdiplus/customlinecap.c | 10 +++++----- dlls/gdiplus/tests/customlinecap.c | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c index 2e7b000355e..c05aecae29a 100644 --- a/dlls/gdiplus/customlinecap.c +++ b/dlls/gdiplus/customlinecap.c @@ -220,14 +220,14 @@ GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom, GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap* custom, REAL inset) { - static int calls; - TRACE("(%p,%0.2f)\n", custom, inset);
- if(!(calls++)) - FIXME("not implemented\n"); + if(!custom) + return InvalidParameter;
- return NotImplemented; + custom->inset = inset; + + return Ok; }
/*FIXME: LineJoin completely ignored now */ diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index c475216ff21..89323040ad1 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -165,6 +165,14 @@ static void test_inset(void) expect(Ok, stat); expectf(0.0, inset);
+ stat = GdipSetCustomLineCapBaseInset(custom, 2.0); + expect(Ok, stat); + + inset = (REAL)0xdeadbeef; + stat = GdipGetCustomLineCapBaseInset(custom, &inset); + expect(Ok, stat); + ok(inset == 2.0, "Unexpected inset value %f\n", inset); + GdipDeleteCustomLineCap(custom); GdipDeletePath(path); }