[OpenJDK 2D-Dev] [9] RFR JDK-6601097:Margins are not reset to hardware margins when width/height is 0 or -ve alongwith x, y
Jayathirth D V
jayathirth.d.v at oracle.com
Mon May 23 11:50:02 UTC 2016
Hi Prasanta,
Verified the changes and even in case of -ve width/height now we are using hardware margins and not java defined 1 inch margin. +1.
Thanks,
Jay
-----Original Message-----
From: prasanta sadhukhan
Sent: Thursday, May 19, 2016 3:30 PM
To: Phil Race; 2d-dev at openjdk.java.net
Subject: [OpenJDK 2D-Dev] [9] RFR JDK-6601097:Margins are not reset to hardware margins when width/height is 0 or -ve alongwith x, y
Hi All,
Please review a fix for jdk9 which is a continuation of the fix of JDK-6543815.
Bug: https://bugs.openjdk.java.net/browse/JDK-6601097
webrev: http://cr.openjdk.java.net/~psadhukhan/6601097/webrev.00/
6543815 fix resets the x,y to 0 if they are negative before creating a MediaPrintableArea and the platform replaces it with hardware margins when printing.
This works only if x/y is negative.
But, If either width/height is negative alongwith x or y, then the margin is set to the java def 1 inch margin and not hardware margins.
This is because width/height -ve results in IAE in MediaPrintableArea constructor and so values are ignored.
Added a check for -ve width/height to make sure width/height are set to minimum paper width/height.
Regards
Prasanta
More information about the 2d-dev
mailing list