On Sun, 29 Jun 2025 06:58:38 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> probably these discussions may help
>> https://mail.openjdk.org/pipermail/2d-dev/2016-July/007152.html
>> https://mail.openjdk.org/pipermail/2d-dev/2016-October/007764.html
>
> And this https://mail.openjdk.org/pipermail/2d-dev/2016-October/007772.html 
> (it has a looong discissuin thread)

@mrserb Putting the discussions aside, does the suggested fix look good to you?

As I said, border painting uses `clipRound` consistently: both in coordinate 
calculation and in thickness calculation. This approach resolves the problem 
reported.

Looking at descriptions of `clipScale` and `clipRound`, it seems the former 
suits better… Yet it makes the rendering less consistent with other borders: 
using `clipScale` switches to 2-pixel and 3-pixel border at 1.50 and 2.50 
correspondingly (from 1 and 2 with `clipRound`). In other cases, the border 
thickness also increases, which may be undesirable.

Overall, there are 6 failures of the `ScaledLineBorderTest.java` test when the 
code in JDK uses `clipScale` instead of `clipRound`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26025#discussion_r2175286281

Reply via email to