src/share/classes/sun/java2d/SunGraphics2D.java

Print this page

        

@@ -92,11 +92,11 @@
 import java.util.Map;
 import java.util.Iterator;
 import sun.misc.PerformanceLogger;
 
 import java.lang.annotation.Native;
-import sun.awt.image.MultiResolutionImage;
+import java.awt.image.MultiResolutionImage;
 
 import static java.awt.geom.AffineTransform.TYPE_FLIP;
 import static java.awt.geom.AffineTransform.TYPE_MASK_SCALE;
 import static java.awt.geom.AffineTransform.TYPE_TRANSLATION;
 import sun.awt.image.MultiResolutionToolkitImage;

@@ -3174,11 +3174,12 @@
 
         int destImageWidth = (int) Math.abs(srcWidth * destRegionWidth / sw);
         int destImageHeight = (int) Math.abs(srcHeight * destRegionHeight / sh);
 
         Image resolutionVariant
-                = img.getResolutionVariant(destImageWidth, destImageHeight);
+                = img.getResolutionVariant(devScale, devScale,
+                        srcWidth, srcHeight, destImageWidth, destImageHeight);
 
         if (resolutionVariant instanceof ToolkitImage
                 && ((ToolkitImage) resolutionVariant).hasError()) {
             return null;
         }