On Wed, 29 Jul 2026 12:08:23 GMT, Jayathirth D V <[email protected]> wrote:
>> test/jdk/java/awt/geom/Area/AreaPath2DDrawTest.java line 28: >> >>> 26: * @bug 8386576 >>> 27: * @summary Checks that when we calculate Area of a path it results >>> 28: * in proper geometry and no horizontal spurious lines are >> >> This proper geometry check is not done..we only check if centre column >> contains no non-white pixels...It doesn't check that the expected circle >> outline was drawn, so an all-white/empty result would pass, it seems...I >> think we should check for positive presence of a known perimeter pixel or >> validate that the resulting Area contains the expected outline > > This regression test is added to verify the functional regression of paths > getting closed between the edges when it should not. Visually this is seen as > horizontal lines within the circle(Attachment in JBS shows this) that we are > trying to draw. And mathematically the horizontal lines will be drawn at > exact same place always for the given edges. So checking most of the center > column pixels is more than sufficient to verify this regression. > > We are not trying to verify whether the whole circle is getting drawn > properly. May be the summary was misleading, i have corrected the same. I made that perimeter check comment because the test checks for white pixel and if nothing is drawn, then also the test will pass, so to mitigate that, I think we should at least add this 2 checks `if (area.isEmpty()) `and` if ((!area.contains(center, center))` so that we know area is not empty and circle center is within the area Also, bufferedimage can be dumped via ImageIO to see what kind of spurious lines get drawn for future, in case it is needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31971#discussion_r3679675417
