< prev index next >

src/java.desktop/windows/classes/sun/java2d/opengl/WGLSurfaceData.java

Print this page

        

*** 35,44 **** --- 35,45 ---- import java.awt.image.ColorModel; import sun.awt.SunToolkit; import sun.awt.Win32GraphicsDevice; import sun.awt.windows.WComponentPeer; import sun.java2d.SurfaceData; + import sun.java2d.pipe.Region; public abstract class WGLSurfaceData extends OGLSurfaceData { protected WComponentPeer peer; private WGLGraphicsConfig graphicsConfig;
*** 163,174 **** } 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; } /** * Returns destination Component associated with this SurfaceData. --- 164,175 ---- } public Rectangle getBounds() { Rectangle r = peer.getBounds(); r.x = r.y = 0; ! r.width = Region.clipRound(r.width * scaleX); ! r.height = Region.clipRound(r.height * scaleY); return r; } /** * Returns destination Component associated with this SurfaceData.
*** 225,236 **** Image image, ColorModel cm, int type) { super(peer, gc, cm, type); ! this.width = (int) Math.ceil(width * scaleX); ! this.height = (int) Math.ceil(height * scaleY); offscreenImage = image; initSurface(this.width, this.height); } --- 226,237 ---- Image image, ColorModel cm, int type) { super(peer, gc, cm, type); ! this.width = Region.clipRound(width * scaleX); ! this.height = Region.clipRound(height * scaleY); offscreenImage = image; initSurface(this.width, this.height); }
*** 239,250 **** } public Rectangle getBounds() { if (type == FLIP_BACKBUFFER) { Rectangle r = peer.getBounds(); ! r.width = (int) Math.ceil(r.width * scaleX); ! r.height = (int) Math.ceil(r.height * scaleY); r.x = r.y = 0; return r; } else { return new Rectangle(width, height); } --- 240,251 ---- } public Rectangle getBounds() { if (type == FLIP_BACKBUFFER) { Rectangle r = peer.getBounds(); ! r.width = Region.clipRound(r.width * scaleX); ! r.height = Region.clipRound(r.height * scaleY); r.x = r.y = 0; return r; } else { return new Rectangle(width, height); }
< prev index next >