Quaqua 7.4.2 2011-07-05

ch.randelshofer.quaqua.util
Class HalfbrightFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by java.awt.image.RGBImageFilter
          extended by 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

Field Summary
 
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
 
Constructor Summary
HalfbrightFilter()
          Creates a new instance.
 
Method Summary
static java.awt.Image createHalfbrightImage(java.awt.Image i)
          Creates a halfbright 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
 

Constructor Detail

HalfbrightFilter

public HalfbrightFilter()
Creates a new instance.

Method Detail

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

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.