diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-11 15:10:34 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-11 15:10:34 +0000 |
commit | 23111468052a9f4ec607b9b10123f62004348216 (patch) | |
tree | f81e272d0159b645be87a876da75ae4911e4dfaa /java/gjt/image/DissolveFilter.java | |
parent | d71e1419e3c009e237fec7a91e832be8fc0fe31a (diff) | |
download | ATCD-TAO-1_0_6.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_0_6'.TAO-1_0_6
Diffstat (limited to 'java/gjt/image/DissolveFilter.java')
-rw-r--r-- | java/gjt/image/DissolveFilter.java | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/java/gjt/image/DissolveFilter.java b/java/gjt/image/DissolveFilter.java deleted file mode 100644 index 027455b39b6..00000000000 --- a/java/gjt/image/DissolveFilter.java +++ /dev/null @@ -1,48 +0,0 @@ -package gjt.image; - -import java.awt.image.*; -import gjt.Assert; - -/** - * A derivation of RGBImageFilter that partially or wholly - * dissolves an image.<p> - * - * Extent of dissolving is set by the setOpacity(int) method, - * which is passed an integer between 0 and 255 (inclusive). - * The integer represents the alpha value to be applied to - * every color in the image.<p> - * - * An alpha value of 255 signifies an opaque color, while an - * alpha value of 0 signifies a translucent color.<p> - * - * @version 1.0, Apr 1 1996 - * @author David Geary - * @see RGBImageFilter - */ -public class DissolveFilter extends RGBImageFilter { - private int opacity; - - public DissolveFilter() { - this(0); - } - public DissolveFilter(int opacity) { - canFilterIndexColorModel = true; - setOpacity(opacity); - } - public void setOpacity(int opacity) { - Assert.notFalse(opacity >= 0 && opacity <= 255); - this.opacity = opacity; - } - public int filterRGB(int x, int y, int rgb) { - DirectColorModel cm = - (DirectColorModel)ColorModel.getRGBdefault(); - int alpha = cm.getAlpha(rgb); - int red = cm.getRed (rgb); - int green = cm.getGreen(rgb); - int blue = cm.getBlue (rgb); - - alpha = opacity; - - return alpha << 24 | red << 16 | green << 8 | blue; - } -} |