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

Phil Race prr at openjdk.java.net
Sun Mar 27 03:05:44 UTC 2022


On Wed, 23 Mar 2022 18:24:05 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:
> 
>   scale stroke width at higher scalings

BTW the graphics is also scaled when printing.
A printer is like a super-hires monitor (ignoring dot-matrix and the like which would be rubbish at this anyway).
Clearly a 1 pixel device space line on a 1200 dpi printer would not be ideal 1200/72 = 16.667 

And the logic (proposed) about adjusting the pixel width needs to be tested.

I think that unless you want to do a lot of printing testing,
then there should be some checking about whether the graphics is a java.awt.print.PrinterGraphics and
use some code kind of like today in that case ...
But a 300 dpi printer may be about the same as a super-hires monitor ?
Even then *theoretically* there's a chance you have a lo-res 150 dpi printer .. but I'd worry about that if it happens

So perhaps, this needs real printer testing printing to a real printer. Or may be more than one.

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

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



More information about the client-libs-dev mailing list