RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v6]
lukeu
duke at openjdk.java.net
Fri Mar 18 02:26:30 UTC 2022
On Thu, 17 Mar 2022 23:50:21 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:
>
> fixed apostrophe in comment of saveImage
The rendering looks good to me now at 100%..175%.
When I look at this natively on my 4k laptop monitor @ 300% scaling though, the single-pixel lines are very thin and faint. Imagine the following image shrunk 3x smaller, for how I see it:

Notice how the black borders of the checkboxes have increased to 3px wide at this scaling level? I think the TitledBorder would look nicer doing similarly, i.e.:
* 2px width lines for [200% .. 300%)
* 3px width lines for [300% .. 400%)
etc.
The border lines also look further off-center with respect to the text at these higher scaling levels. However if the lines are made fatter keeping at the same topmost pixel position then I _think_ (just eye-balling it) that will also resolve this issue.
(I guess this could raise a question of how the "etched" effect should be rendered at higher resolutions: Should some of the light lines have diagonal endings, extending the simplistic "lighting modal" that the etched style is supposed to represent? Or is it fine to just keep all lines square-ended, literally just zooming the original pixel-art-style borders? Personally, I'm fine with the latter.)
-------------
PR: https://git.openjdk.java.net/jdk/pull/7449
More information about the client-libs-dev
mailing list