On Fri, 28 Apr 2023 21:33:11 GMT, Sergey Bylokhov <s...@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

Reply via email to