RFR: JDK-8294427 - Check boxes and radio buttons have rendering issues on Windows in High DPI env [v2]
Alexey Ivanov
aivanov at openjdk.org
Tue May 16 19:32:51 UTC 2023
On Fri, 28 Apr 2023 21:33:11 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Rajat Mahajan has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - code cleanup as per suggestions from reviewers
>> - code cleanup from suggestions in code review
>
> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/XPStyle.java line 685:
>
>> 683: Graphics2D g2d = (Graphics2D) g;
>> 684: AffineTransform at = g2d.getTransform();
>> 685: int dpi = (int)(at.getScaleX() * 96);
>
> I think this will not work if the image is not VolatileImage, the scale will be = 1 and as a result, the image could be twice smaller than expected on the HiDPI monitor since rescale operation in another place is deleted. Please double-check.
Could you elaborate, please? How can this be not a `VolatileImage`?
If the components are painted into a `BufferedImage`, the scale needs to be specified explicitly if it's the intent.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13701#discussion_r1195606984
More information about the client-libs-dev
mailing list