j2d.filters
Class OpacityFilter
java.lang.Object
j2d.filters.AbstractBufferedImageOp
j2d.filters.PointFilter
j2d.filters.OpacityFilter
- All Implemented Interfaces:
- ImageProcessorInterface, java.awt.image.BufferedImageOp, java.io.Serializable, java.lang.Cloneable
public class OpacityFilter
- extends PointFilter
- implements java.io.Serializable
Sets the opacity (alpha) of every pixel in an image to a constant value.
- See Also:
- Serialized Form
Constructor Summary |
OpacityFilter()
Construct an OpacityFilter with 50% opacity. |
Method Summary |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
|
int |
filterRGB(int x,
int y,
int rgb)
|
int |
getOpacity()
Get the opacity setting. |
void |
setOpacity(int opacityf)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OpacityFilter
public OpacityFilter()
- Construct an OpacityFilter with 50% opacity.
setOpacity
public void setOpacity(int opacityf)
getOpacity
public int getOpacity()
- Get the opacity setting.
- Returns:
- the opacity
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
- Specified by:
filter
in interface java.awt.image.BufferedImageOp
- Overrides:
filter
in class PointFilter
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Specified by:
filterRGB
in class PointFilter
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object