ch.randelshofer.quaqua.util
Class ShadowFilter
java.lang.Object
java.awt.image.ImageFilter
java.awt.image.RGBImageFilter
ch.randelshofer.quaqua.util.ShadowFilter
- All Implemented Interfaces:
- java.awt.image.ImageConsumer, java.lang.Cloneable
public class ShadowFilter
- extends java.awt.image.RGBImageFilter
ShadowFilter changes the color of an image to all black, and
reduces the alpha channel to 50 percent.
This is used by the Quaqua Look and Feel, to create a shadow 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 |
Method Summary |
static java.awt.Image |
createShadowImage(java.awt.Image i)
Creates a shadow image |
int |
filterRGB(int x,
int y,
int rgb)
|
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 |
ShadowFilter
public ShadowFilter()
- Creates a new instance.
createShadowImage
public static java.awt.Image createShadowImage(java.awt.Image i)
- Creates a shadow image
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Specified by:
filterRGB
in class java.awt.image.RGBImageFilter