<AWT Dev> RFR: 8182043 Access to Windows Large Icons
Eirik Bakke
ebakke at ultorg.com
Mon Mar 30 14:55:40 UTC 2020
Hi, Alex.
Beware that MultiResolutionImage is not reliable on Windows due to https://bugs.openjdk.java.net/browse/JDK-8212226 . It would seem very easy to fix the latter bug, though. Just have SunGraphics2D.drawHiDPIImage return false instead of null if img is a MultiResolutionImage with zero dimensions.
(I discovered the bug above while implementing HiDPI/SVG icon support for the Apache NetBeans IDE. We ended up having to avoid MultiResolutionImage altogether on Windows.)
-- Eirik
From: awt-dev <awt-dev-bounces at openjdk.java.net> On Behalf Of Alexander Zuev
Sent: Monday, March 30, 2020 7:19 AM
To: awt-dev at openjdk.java.net
Subject: <AWT Dev> RFR: 8182043 Access to Windows Large Icons
Hello,
please review my fix for the issue 8182043: Access to Windows Large Icons
Bug: https://bugs.openjdk.java.net/browse/JDK-8182043
Webrev: http://cr.openjdk.java.net/~kizune/8182043/webrev<http://cr.openjdk.java.net/~kizune/8182043/webrev/>
Main idea is to provide a new API call to retrieve image of the specified size
and to make Windows implementation that for all the resolutions higher than 24 pixels
returns the multi resolution image icon with image inside being the highest quality icon
available and the size set to the size requested by the user. This way we will have good
scaling across the different resolution while maintaining relative sizes in the UI intact.
The exception made for images size of 24 and less since sometimes application has
different image for the small icons in its resource section which is optimized to
make sure that on low resolution screen this icon is not displayed as just scaled down
blurry little square.
/Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20200330/df7fdce4/attachment.htm>
More information about the awt-dev
mailing list