You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
p62xrbca7/javax/swing/DebugGraphicsFilter.java

47 lines
657 B

/*
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing;
import java.awt.*;
import java.awt.image.*;
/** Color filter for DebugGraphics, used for images only.
*
* @author Dave Karlton
*/
class DebugGraphicsFilter extends RGBImageFilter {
Color color;
DebugGraphicsFilter(Color c) {
canFilterIndexColorModel = true;
color = c;
}
public int filterRGB(int x, int y, int rgb) {
return color.getRGB() | (rgb & 0xFF000000);
}
}