RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v3]

Alexey Ivanov aivanov at openjdk.java.net
Wed Mar 16 15:47:42 UTC 2022


On Tue, 15 Mar 2022 16:51:56 GMT, lukeu <duke at openjdk.java.net> wrote:

> I believe the only way to get pixel-perfect (& balanced weight) rendering of 2 lines next to each other at non-integer scale factors, when using integer based APIs like `drawLine`, will be to undo the affine transformation upon the pre-scaled `Graphics2D` object, and render it at 1x scaling. Then you'd need to decide how to compute the desired line thickness (like: should it jump 1px > 2px at 150% scaling or 175% scaling?)

I've been thinking about it. It could be the approach to use for drawing borders. Windows controls render 1-pixel borders when the scale is 200%.

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

PR: https://git.openjdk.java.net/jdk/pull/7449



More information about the client-libs-dev mailing list