< prev index next >

src/java.desktop/windows/classes/sun/java2d/windows/GDIWindowSurfaceData.java

Print this page

        

*** 26,35 **** --- 26,36 ---- package sun.java2d.windows; import java.awt.Rectangle; import java.awt.GraphicsConfiguration; import java.awt.color.ColorSpace; + import java.awt.geom.AffineTransform; import java.awt.image.ColorModel; import java.awt.image.ComponentColorModel; import java.awt.image.DirectColorModel; import java.awt.image.IndexColorModel; import java.awt.image.Raster;
*** 75,84 **** --- 76,88 ---- public static final SurfaceType ThreeByteBgrGdi = SurfaceType.ThreeByteBgr.deriveSubType(DESC_GDI); private static native void initIDs(Class<?> xorComp); + private final double scaleX; + private final double scaleY; + static { initIDs(XORComposite.class); if (WindowsFlags.isGdiBlitEnabled()) { // Register our gdi Blit loops GDIBlitLoops.register();
*** 263,279 **** bMask = dcm.getBlueMask(); } this.graphicsConfig = (Win32GraphicsConfig) peer.getGraphicsConfiguration(); this.solidloops = graphicsConfig.getSolidLoops(sType); ! ! Win32GraphicsDevice gd = ! (Win32GraphicsDevice)graphicsConfig.getDevice(); initOps(peer, depth, rMask, gMask, bMask, gd.getScreen()); setBlitProxyKey(graphicsConfig.getProxyKey()); } /** * {@inheritDoc} * * Overridden to use ScreenUpdateManager to obtain the replacement surface. * --- 267,293 ---- bMask = dcm.getBlueMask(); } this.graphicsConfig = (Win32GraphicsConfig) peer.getGraphicsConfiguration(); this.solidloops = graphicsConfig.getSolidLoops(sType); ! Win32GraphicsDevice gd = graphicsConfig.getDevice(); ! scaleX = gd.getDefaultScaleX(); ! scaleY = gd.getDefaultScaleY(); initOps(peer, depth, rMask, gMask, bMask, gd.getScreen()); setBlitProxyKey(graphicsConfig.getProxyKey()); } + @Override + public double getDefaultScaleX() { + return scaleX; + } + + @Override + public double getDefaultScaleY() { + return scaleY; + } + /** * {@inheritDoc} * * Overridden to use ScreenUpdateManager to obtain the replacement surface. *
*** 286,295 **** --- 300,311 ---- } public Rectangle getBounds() { Rectangle r = peer.getBounds(); r.x = r.y = 0; + r.width = (int) Math.ceil(r.width * scaleX); + r.height = (int) Math.ceil(r.height * scaleY); return r; } public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)
< prev index next >