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); |