All Packages Class Hierarchy This Package Previous Next Index
Class com.jhlabs.image.OpacityFilter
java.lang.Object
|
+----java.awt.image.ImageFilter
|
+----java.awt.image.RGBImageFilter
|
+----com.jhlabs.image.OpacityFilter
- public class OpacityFilter
- extends java.awt.image.RGBImageFilter
- implements java.io.Serializable
Sets the opacity (alpha) of every pixel in an image to a constant value.
-
OpacityFilter()
- Construct an OpacityFilter with 50% opacity.
-
OpacityFilter(int)
- Construct an OpacityFilter with the given opacity (alpha).
-
filterRGB(int, int, int)
-
-
getOpacity()
- Get the opacity setting.
-
setOpacity(int)
- Set the opacity.
-
toString()
-
OpacityFilter
public OpacityFilter()
- Construct an OpacityFilter with 50% opacity.
OpacityFilter
public OpacityFilter(int opacity)
- Construct an OpacityFilter with the given opacity (alpha).
setOpacity
public void setOpacity(int opacity)
- Set the opacity.
- Parameters:
- opacity - the opacity (alpha) in the range 0..255
getOpacity
public int getOpacity()
- Get the opacity setting.
- Returns:
- the opacity
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Overrides:
- filterRGB in class java.awt.image.RGBImageFilter
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
All Packages Class Hierarchy This Package Previous Next Index