|
Genuts API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.image.ImageFilter
java.awt.image.RGBImageFilter
com.genuts.gameui.image.TransparentColorFilter
Converts a given color of an image to the transparent pixel.
Here is the code for simplest way of use for this filter:
Image transpImage = playfield.createImage(new FilteredImageSource(image.getSource(), new TransparentColorFilter(transpRGB)));
java.awt.image.RGBImageFilter
,
java.awt.image.FilteredImageSource
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 | |
TransparentColorFilter(int transpRGB)
Creates the filter with the given color to convert. |
Method Summary | |
int |
filterRGB(int x,
int y,
int rgb)
Converts a single input pixel in the default RGB ColorModel to a single output pixel. |
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 |
public TransparentColorFilter(int transpRGB)
transpRGB
- transparent color to convert.Method Detail |
public int filterRGB(int x, int y, int rgb)
|
Genuts API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |