org.bounce.image
Class SilhouetteFilter
java.lang.Object
java.awt.image.ImageFilter
java.awt.image.RGBImageFilter
org.bounce.image.BaseFilter
org.bounce.image.SilhouetteFilter
- All Implemented Interfaces:
- java.awt.image.ImageConsumer, java.lang.Cloneable
public class SilhouetteFilter
- extends BaseFilter
A filter to create an silhouette of an image, ie a
visible pixel is replaced by a pixel of a different color.
- Version:
- $Revision: 1.4 $, $Date: 2008/01/28 21:28:37 $
- Author:
- Edwin Dankert
| 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 |
SilhouetteFilter(java.awt.Color color)
Constructs a Filter that can be used to create a silhouette. |
|
Method Summary |
int |
filterRGB(int x,
int y,
int rgb)
Overrides RGBImageFilter.filterRGB. |
| 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 |
SilhouetteFilter
public SilhouetteFilter(java.awt.Color color)
- Constructs a Filter that can be used to create a silhouette.
- Parameters:
color - the color of the silhouette.
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Overrides
RGBImageFilter.filterRGB.
- Specified by:
filterRGB in class java.awt.image.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-2002-2010 Edwin Dankert. All Rights Reserved.