VASSAL.tools
Class TransparentFilter
java.lang.Object
|
+--java.awt.image.ImageFilter
|
+--java.awt.image.RGBImageFilter
|
+--VASSAL.tools.TransparentFilter
- All Implemented Interfaces:
- java.lang.Cloneable, java.awt.image.ImageConsumer
- public class TransparentFilter
- extends java.awt.image.RGBImageFilter
Sets the transparency of colors in an image
| 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 |
|
Method Summary |
int |
filterRGB(int x,
int y,
int rgb)
|
static int |
getOffscreenEquivalent(int color,
java.awt.Component obs)
For the given input color, return the color that this color
will map to in an offscreen image created by the given Component |
void |
setAlpha(double alpha)
|
void |
setAlpha(double alpha,
java.awt.Color c)
|
void |
setAlpha(double alpha,
int color)
|
| 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 |
TransparentFilter
public TransparentFilter()
TransparentFilter
public TransparentFilter(double alpha)
setAlpha
public void setAlpha(double alpha)
setAlpha
public void setAlpha(double alpha,
int color)
getOffscreenEquivalent
public static int getOffscreenEquivalent(int color,
java.awt.Component obs)
- For the given input color, return the color that this color
will map to in an offscreen image created by the given Component
setAlpha
public void setAlpha(double alpha,
java.awt.Color c)
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Overrides:
filterRGB in class java.awt.image.RGBImageFilter