<Swing Dev> Review Request JDK-8159168 [hidpi] Window.setShape() works incorrectly on HiDPI

Alexandr Scherbatiy alexandr.scherbatiy at oracle.com
Mon Jul 4 12:32:41 UTC 2016


On 7/4/2016 3:09 PM, Rajeev Chamyal wrote:
>
> Hello All,
>
> Please review the following webrev.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8159168
>
> Webrev: http://cr.openjdk.java.net/~rchamyal/8159168/webrev.00/ 
> <http://cr.openjdk.java.net/%7Erchamyal/8159168/webrev.00/>
>
> Issue: In HiDPI screen shape set through window::setShape API is not 
> scaled based on system scale.
>
> Fix:. Updated the WComponentPeer::applyShape to update shape based on 
> system scale.
>
1131             double scaleX = 
winGraphicsConfig.getDefaultTransform().getScaleX();
1132             double scaleY = 
winGraphicsConfig.getDefaultTransform().getScaleY();

  The getDefaultTransform() is called twice which leads that 
AffineTransform object is created two times
1133             if (scaleX != 1 && scaleY != 1 && scaleX == scaleY) {

    Is the check scaleX == scaleY really necessary here?

    Is it possible to make the test automated? Just run it with option 
"@run main/othervm -Dsun.java2d.uiScale=2 TestName" and check the area 
where the shape is drawn?

   Thanks,
   Alexandr.
>
> Regards,
>
> Rajeev Chamyal
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20160704/0b26e8e7/attachment.html>


More information about the swing-dev mailing list