org.bounce.image
Class GreenFilter
java.lang.Object
java.awt.image.ImageFilter
java.awt.image.RGBImageFilter
org.bounce.image.BaseFilter
org.bounce.image.GreenFilter
- All Implemented Interfaces:
- ImageConsumer, Cloneable
public class GreenFilter
- extends BaseFilter
A filter to create a 'green scale' image.
|
Constructor Summary |
GreenFilter(int p)
Constructs a Filter that can be used to construct a
green-scale image. |
|
Method Summary |
int |
filterRGB(int x,
int y,
int rgb)
Overrides RGBImageFilter.filterRGB. |
GreenFilter
public GreenFilter(int p)
- Constructs a Filter that can be used to construct a
green-scale image.
- Parameters:
p - the percentage of color in the range 0..100, where 100 is
the darkest, and 0 is the lightest.
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Overrides
RGBImageFilter.filterRGB.
- Specified by:
filterRGB in class RGBImageFilter
- Parameters:
x - the horizontal position of the pixel.y - the vertical position of the pixel.rgb - the color of the pixel.
- Returns:
- the new rgb value
Copyright © 2002 - 2007 Edwin Dankert. All Rights Reserved.