Hello Alexandr,
Thanks for the review. As per windows specification X & Y scale are always equal that's why I have put scaleX == scaleY check. But it may change in future so I have removed this check. http://cr.openjdk.java.net/~rchamyal/8159168/webrev.01/ Regards, Rajeev Chamyal From: Alexandr Scherbatiy Sent: 04 July 2016 18:03 To: Rajeev Chamyal; swing-dev@openjdk.java.net; Sergey Bylokhov Subject: Re: <Swing Dev> Review Request JDK-8159168 [hidpi] Window.setShape() works incorrectly on HiDPI 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: HYPERLINK "http://cr.openjdk.java.net/%7Erchamyal/8159168/webrev.00/"http://cr.openjdk.java.net/~rchamyal/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