jdk/src/share/classes/javax/swing/JViewport.java
changeset 13234 9437e5985d73
parent 11980 da6a2d56e693
child 20104 113755166f65
equal deleted inserted replaced
13233:4d45f7ebc0d7 13234:9437e5985d73
  1584         //   clip* are in the views coordinate space.
  1584         //   clip* are in the views coordinate space.
  1585         RepaintManager rm = RepaintManager.currentManager(this);
  1585         RepaintManager rm = RepaintManager.currentManager(this);
  1586         int bdx = blitToX - blitFromX;
  1586         int bdx = blitToX - blitFromX;
  1587         int bdy = blitToY - blitFromY;
  1587         int bdy = blitToY - blitFromY;
  1588 
  1588 
       
  1589         Composite oldComposite = null;
  1589         // Shift the scrolled region
  1590         // Shift the scrolled region
       
  1591         if (g instanceof Graphics2D) {
       
  1592             Graphics2D g2d = (Graphics2D) g;
       
  1593             oldComposite = g2d.getComposite();
       
  1594             g2d.setComposite(AlphaComposite.Src);
       
  1595         }
  1590         rm.copyArea(this, g, blitFromX, blitFromY, blitW, blitH, bdx, bdy,
  1596         rm.copyArea(this, g, blitFromX, blitFromY, blitW, blitH, bdx, bdy,
  1591                     false);
  1597                     false);
  1592 
  1598         if (oldComposite != null) {
       
  1599             ((Graphics2D) g).setComposite(oldComposite);
       
  1600         }
  1593         // Paint the newly exposed region.
  1601         // Paint the newly exposed region.
  1594         int x = view.getX();
  1602         int x = view.getX();
  1595         int y = view.getY();
  1603         int y = view.getY();
  1596         g.translate(x, y);
  1604         g.translate(x, y);
  1597         g.setClip(clipX, clipY, clipW, clipH);
  1605         g.setClip(clipX, clipY, clipW, clipH);