From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/customlinecap.c | 5 ++-- dlls/gdiplus/tests/customlinecap.c | 37 ++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c index f35fea90eba..e767f20e4b3 100644 --- a/dlls/gdiplus/customlinecap.c +++ b/dlls/gdiplus/customlinecap.c @@ -105,8 +105,9 @@ static GpStatus init_custom_linecap(GpCustomLineCap *cap, GpPathData *pathdata, return Ok; }
-/* FIXME: Sometimes when fillPath is non-null and stroke path is null, the native - * version of this function returns NotImplemented. I cannot figure out why. */ +/* Custom line cap position (0, 0) is a place corresponding to the end of line. +* If Custom Line Cap is too big and too far from position (0, 0), +* then NotImplemented will be returned, due to floating point precision limitation. */ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath, GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap) { diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index a8bb5cf371b..de2967c3853 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -49,17 +49,17 @@ static BOOL compare_float(float f, float g, unsigned int ulps) static void test_constructor_destructor(void) { GpCustomLineCap *custom; - GpPath *path, *path2; + GpPath *path, *path2, *path3; GpStatus stat;
stat = GdipCreatePath(FillModeAlternate, &path); expect(Ok, stat); - stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); + stat = GdipAddPathRectangle(path, -5.0, -4.0, 10.0, 8.0); expect(Ok, stat);
stat = GdipCreatePath(FillModeAlternate, &path2); expect(Ok, stat); - stat = GdipAddPathRectangle(path2, 5.0, 5.0, 10.0, 10.0); + stat = GdipAddPathRectangle(path2, -5.0, -5.0, 10.0, 10.0); expect(Ok, stat);
/* NULL args */ @@ -74,18 +74,45 @@ static void test_constructor_destructor(void) stat = GdipDeleteCustomLineCap(NULL); expect(InvalidParameter, stat);
+ /* The fillPath and strokePath parameters cannot be used at the same time + * If both parameters is provided, then fillPath will be ignored. */ + custom = NULL; + stat = GdipCreateCustomLineCap(path, path2, LineCapFlat, 0.0, &custom); + expect(Ok, stat); + ok(custom != NULL, "Custom line cap was not created\n"); + stat = GdipDeleteCustomLineCap(custom); + expect(Ok, stat); + /* valid args */ + custom = NULL; stat = GdipCreateCustomLineCap(NULL, path2, LineCapFlat, 0.0, &custom); expect(Ok, stat); + ok(custom != NULL, "Custom line cap was not created\n"); stat = GdipDeleteCustomLineCap(custom); expect(Ok, stat); - /* it's strange but native returns NotImplemented on stroke == NULL */ + + custom = NULL; + stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 0.0, &custom); + expect(Ok, stat); + ok(custom != NULL, "Custom line cap was not created\n"); + stat = GdipDeleteCustomLineCap(custom); + expect(Ok, stat); + + /* Custom line cap position (0, 0) is a place corresponding to the end of line. + * If Custom Line Cap is too big and too far from position (0, 0), + * then NotImplemented will be returned, due to floating point precision limitation. */ + stat = GdipCreatePath(FillModeAlternate, &path3); + expect(Ok, stat); + stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); + expect(Ok, stat); + custom = NULL; - stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 10.0, &custom); + stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 0.0, &custom); todo_wine expect(NotImplemented, stat); todo_wine ok(custom == NULL, "Expected a failure on creation\n"); if(stat == Ok) GdipDeleteCustomLineCap(custom);
+ GdipDeletePath(path3); GdipDeletePath(path2); GdipDeletePath(path); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=135976
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w7u_adm (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w7u_el (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w8 (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w8adm (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w864 (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064v1507 (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064v1809 (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064_tsign (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w10pro64 (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w11pro64 (32 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w7pro64 (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w864 (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064v1507 (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064v1809 (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064_2qxl (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064_adm (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w1064_tsign (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w10pro64 (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w10pro64_en_AE_u8 (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w10pro64_ar (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w10pro64_ja (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w10pro64_zh_CN (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
=== w11pro64_amd (64 bit report) ===
gdiplus: customlinecap.c:111: Test failed: Expected 00000006, got 00000000 customlinecap.c:112: Test failed: Expected a failure on creation
I see you've created several draft MR's that may have been created solely to run tests, etc. In case you were not aware, you can access the testbot directly. The workflow is a little different, but it gives you greater control of the testing, as well as avoiding the noise of opening and closing MR's on gitlab.
On Sat Aug 12 14:42:31 2023 +0000, Jeffrey Smith wrote:
I see you've created several draft MR's that may have been created solely to run tests, etc. In case you were not aware, you can access the testbot directly. The workflow is a little different, but it gives you greater control of the testing, as well as avoiding the noise of opening and closing MR's on gitlab.
Thanks you for the tip Jeffrey. I didn't know about that. Do you have any documentation how to use testbot directly?