< prev index next >

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

Print this page

        

*** 3144,3153 **** --- 3144,3161 ---- if (0 < width && 0 < height && 0 < rvWidth && 0 < rvHeight) { double widthScale = ((double) rvWidth) / width; double heightScale = ((double) rvHeight) / height; + if (resolutionVariant instanceof VolatileImage) { + SurfaceData sd = SurfaceManager + .getManager(resolutionVariant) + .getPrimarySurfaceData(); + widthScale *= sd.getDefaultScaleX(); + heightScale *= sd.getDefaultScaleY(); + } + sx1 = Region.clipScale(sx1, widthScale); sy1 = Region.clipScale(sy1, heightScale); sx2 = Region.clipScale(sx2, widthScale); sy2 = Region.clipScale(sy2, heightScale);
< prev index next >