de.htwdd.rosenkoenig.util
Class ColorFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by java.awt.image.RGBImageFilter
          extended by de.htwdd.rosenkoenig.util.ColorFilter
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.lang.Cloneable

public class ColorFilter
extends java.awt.image.RGBImageFilter

More elaborate ColorFilter supporting brightening of the Image


Field Summary
private  int pMask
          Determines the amount the image will be brightened;
 
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
ColorFilter()
          Default constructor, uses 0xFF000000 as mask.
ColorFilter(int mask)
           
 
Method Summary
 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
 

Field Detail

pMask

private int pMask
Determines the amount the image will be brightened;

Constructor Detail

ColorFilter

public ColorFilter()
Default constructor, uses 0xFF000000 as mask.


ColorFilter

public ColorFilter(int mask)
Parameters:
percentage - overrides the classes default mask 0xFF000000.
Method Detail

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Specified by:
filterRGB in class java.awt.image.RGBImageFilter
Parameters:
x - x coordinate of the currently processed pixel
y - y coordinate of the currently processed pixel
rgb - alpha, red, green, blue value of the pixel