ch.randelshofer.quaqua.util
Class HalfbrightFilter
java.lang.Object
java.awt.image.ImageFilter
java.awt.image.RGBImageFilter
ch.randelshofer.quaqua.util.HalfbrightFilter
- All Implemented Interfaces:
- java.awt.image.ImageConsumer, java.lang.Cloneable
public class HalfbrightFilter
- extends java.awt.image.RGBImageFilter
HalfbrightFilter reduces the brightness of an image by 50 percent.
Leaves the alpha channel untouched.
This is used by the Quaqua Look and Feel, to create a pressed image.
- Version:
- 1.0 28 March 2005 Created.
- Author:
- Werner Randelshofer
Fields inherited from class java.awt.image.RGBImageFilter |
canFilterIndexColorModel, newmodel, origmodel |
Fields inherited from class java.awt.image.ImageFilter |
consumer |
Fields inherited from interface java.awt.image.ImageConsumer |
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT |
Methods inherited from class java.awt.image.RGBImageFilter |
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel |
Methods inherited from class java.awt.image.ImageFilter |
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HalfbrightFilter
public HalfbrightFilter()
- Creates a new instance.
createHalfbrightImage
public static java.awt.Image createHalfbrightImage(java.awt.Image i)
- Creates a halfbright image
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Specified by:
filterRGB
in class java.awt.image.RGBImageFilter