< prev index next >
src/windows/classes/sun/awt/windows/WComponentPeer.java
Print this page
rev 1556 : 6794764: Translucent windows are completely repainted on every paint event, on Windows
6719382: Printing of AWT components on windows is not working
6726866: Repainting artifacts when resizing or dragging JInternalFrames in non-opaque toplevel
6683775: Painting artifacts is seen when panel is made setOpaque(false) for a translucent window
Reviewed-by: anthony, tdv, alexp
rev 1571 : 8010297: Missing isLoggable() checks in logging code
Summary: Add isLoggable() checks
Reviewed-by: anthony, mchung, serb
Contributed-by: Laurent Bourges <bourges.laurent@gmail.com>
@@ -239,11 +239,12 @@
public void repaint(long tm, int x, int y, int width, int height) {
}
private static final double BANDING_DIVISOR = 4.0;
private native int[] createPrintedPixels(int srcX, int srcY,
- int srcW, int srcH);
+ int srcW, int srcH,
+ int alpha);
public void print(Graphics g) {
Component comp = (Component)target;
// To conserve memory usage, we will band the image.
@@ -261,11 +262,13 @@
if (endY >= totalH) {
endY = totalH - 1;
}
int h = endY - startY + 1;
- int[] pix = createPrintedPixels(0, startY, totalW, h);
+ Color bgColor = comp.getBackground();
+ int[] pix = createPrintedPixels(0, startY, totalW, h,
+ bgColor == null ? 255 : bgColor.getAlpha());
if (pix != null) {
BufferedImage bim = new BufferedImage(totalW, h,
BufferedImage.TYPE_INT_ARGB);
bim.setRGB(0, 0, totalW, h, pix, 0, totalW);
g.drawImage(bim, 0, startY, null);
@@ -947,12 +950,11 @@
* Applies the shape to the native component window.
* @since 1.7
*/
public void applyShape(Region shape) {
if (shapeLog.isLoggable(Level.FINER)) {
- shapeLog.finer(
- "*** INFO: Setting shape: PEER: " + this
+ shapeLog.finer("*** INFO: Setting shape: PEER: " + this
+ "; TARGET: " + target
+ "; SHAPE: " + shape);
}
if (shape != null) {
< prev index next >