On Thu, 4 Apr 2024 09:12:22 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> 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. 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-2036727358

Reply via email to