RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v3]
Alexey Ivanov
aivanov at openjdk.java.net
Mon Mar 14 23:30:40 UTC 2022
On Mon, 14 Mar 2022 16:15:47 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping
>
> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>
> added functions for drawing border, fixed translate
I believe is the issue is broader. I modified the test to display four panels, each panel is moved pixel to the left. The screenshots below are taken with the current JDK code _without_ Alisen's fix.
**125%**

**150%**

When uiScale=1.25, you can see there's background color between the shadow and highlight on the second panel. The same problem is seen for the upper border. When uiScale=1.5, you can see that some lines are 2-pixel wide and some are 1-pixel wide.
I believe it's because of rounding. I don't know how we can make sure the lines are always drawn next to each other and always have the same thickness.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7449
More information about the client-libs-dev
mailing list