< prev index next >

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

Print this page




 285     public double getDefaultScaleY() {
 286         return scaleY;
 287     }
 288 
 289     /**
 290      * {@inheritDoc}
 291      *
 292      * Overridden to use ScreenUpdateManager to obtain the replacement surface.
 293      *
 294      * @see sun.java2d.ScreenUpdateManager#getReplacementScreenSurface
 295      */
 296     @Override
 297     public SurfaceData getReplacement() {
 298         ScreenUpdateManager mgr = ScreenUpdateManager.getInstance();
 299         return mgr.getReplacementScreenSurface(peer, this);
 300     }
 301 
 302     public Rectangle getBounds() {
 303         Rectangle r = peer.getBounds();
 304         r.x = r.y = 0;
 305         r.width = (int) Math.ceil(r.width * scaleX);
 306         r.height = (int) Math.ceil(r.height * scaleY);
 307         return r;
 308     }
 309 
 310     public boolean copyArea(SunGraphics2D sg2d,
 311                             int x, int y, int w, int h, int dx, int dy)
 312     {
 313         CompositeType comptype = sg2d.imageComp;
 314         if (sg2d.clipState != SunGraphics2D.CLIP_SHAPE &&
 315             (CompositeType.SrcOverNoEa.equals(comptype) ||
 316              CompositeType.SrcNoEa.equals(comptype)))
 317         {
 318             int dstx1 = x + dx;
 319             int dsty1 = y + dy;
 320             int dstx2 = dstx1 + w;
 321             int dsty2 = dsty1 + h;
 322             Region clip = sg2d.getCompClip();
 323             if (dstx1 < clip.getLoX()) dstx1 = clip.getLoX();
 324             if (dsty1 < clip.getLoY()) dsty1 = clip.getLoY();
 325             if (dstx2 > clip.getHiX()) dstx2 = clip.getHiX();
 326             if (dsty2 > clip.getHiY()) dsty2 = clip.getHiY();




 285     public double getDefaultScaleY() {
 286         return scaleY;
 287     }
 288 
 289     /**
 290      * {@inheritDoc}
 291      *
 292      * Overridden to use ScreenUpdateManager to obtain the replacement surface.
 293      *
 294      * @see sun.java2d.ScreenUpdateManager#getReplacementScreenSurface
 295      */
 296     @Override
 297     public SurfaceData getReplacement() {
 298         ScreenUpdateManager mgr = ScreenUpdateManager.getInstance();
 299         return mgr.getReplacementScreenSurface(peer, this);
 300     }
 301 
 302     public Rectangle getBounds() {
 303         Rectangle r = peer.getBounds();
 304         r.x = r.y = 0;
 305         r.width = Region.clipRound(r.width * scaleX);
 306         r.height = Region.clipRound(r.height * scaleY);
 307         return r;
 308     }
 309 
 310     public boolean copyArea(SunGraphics2D sg2d,
 311                             int x, int y, int w, int h, int dx, int dy)
 312     {
 313         CompositeType comptype = sg2d.imageComp;
 314         if (sg2d.clipState != SunGraphics2D.CLIP_SHAPE &&
 315             (CompositeType.SrcOverNoEa.equals(comptype) ||
 316              CompositeType.SrcNoEa.equals(comptype)))
 317         {
 318             int dstx1 = x + dx;
 319             int dsty1 = y + dy;
 320             int dstx2 = dstx1 + w;
 321             int dsty2 = dsty1 + h;
 322             Region clip = sg2d.getCompClip();
 323             if (dstx1 < clip.getLoX()) dstx1 = clip.getLoX();
 324             if (dsty1 < clip.getLoY()) dsty1 = clip.getLoY();
 325             if (dstx2 > clip.getHiX()) dstx2 = clip.getHiX();
 326             if (dsty2 > clip.getHiY()) dsty2 = clip.getHiY();


< prev index next >