On Mon, 11 Mar 2024 10:05:41 GMT, Tejesh R <t...@openjdk.org> wrote: > Fix suggested in bug > [8210807](https://github.com/openjdk/jdk/commit/38bbbe7588c94d3a0edd1c120ba49cbd0851a720) > had a regression in Nimbus L&F yet it resolved the issue in other L&F. The > better approach would be to handle `MultiResolutionImages `in `PathGraphics` > class `getBufferedImage` method and is suggested here. The fix doesn't cause > any regression and is verified in CI system. The test > javax/swing/JTable/JTableScrollPrintTest.java is verified for all platforms > and all L&F (Except in Windows it doesn't work due an issue introduced in 22, > yet to investigate on it). And also fix > [8210807](https://github.com/openjdk/jdk/commit/38bbbe7588c94d3a0edd1c120ba49cbd0851a720) > has been reverted, retaining the test.
> > Can you please explain why you need to handle MultiResolutionImage for this > > printing issue for NimbusL&F and why was it not needed for other L&F Also, > > you need to add this bugid to the test > > The fix is for L&F other than Nimbus. It is working in Nimbus since Image > drawing is handled by SunGraphics2D class in > [drawHIDPIImage()](https://github.com/openjdk/jdk/blob/b9da14012da5f1f72d4f6e690c18a43e87523173/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L3126) > method. Whereas other L&F, pathGraphics handles ImageDrawing where > MultiResolutionImage is not yet handled. The fix which I proposed for > [8210807](https://github.com/openjdk/jdk/commit/38bbbe7588c94d3a0edd1c120ba49cbd0851a720) > bug fixed for Non-Nimbus L&F but caused regression for Nimbus (Since in > Nimbus SunGraphics2D was handling Image drawing where I proposed a fix to > retain PathGraphics, hence casued regression for Nimbus). Hence after further > analysis and study the root cause was found out to be Non-handling of > MultiResolutionImage in > [getBufferedImage()](https://github.com/openjdk/jdk/blob/b9da14012da5f1f72d4f6e690c18a43e87523173/src/java.desktop/share/classes/sun/print/PathGraphics.java#L1122). ------------- PR Comment: https://git.openjdk.org/jdk/pull/18187#issuecomment-2036733899