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.


Constructor Index

 o OpacityFilter()
Construct an OpacityFilter with 50% opacity.
 o OpacityFilter(int)
Construct an OpacityFilter with the given opacity (alpha).

Method Index

 o filterRGB(int, int, int)
 o getOpacity()
Get the opacity setting.
 o setOpacity(int)
Set the opacity.
 o toString()

Constructors

 o OpacityFilter
 public OpacityFilter()
Construct an OpacityFilter with 50% opacity.

 o OpacityFilter
 public OpacityFilter(int opacity)
Construct an OpacityFilter with the given opacity (alpha).

Methods

 o setOpacity
 public void setOpacity(int opacity)
Set the opacity.

Parameters:
opacity - the opacity (alpha) in the range 0..255
 o getOpacity
 public int getOpacity()
Get the opacity setting.

Returns:
the opacity
 o filterRGB
 public int filterRGB(int x,
                      int y,
                      int rgb)
Overrides:
filterRGB in class java.awt.image.RGBImageFilter
 o toString
 public java.lang.String toString()
Overrides:
toString in class java.lang.Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index