railo.runtime.img.filter
Class OpacityFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.PointFilter
          extended by railo.runtime.img.filter.OpacityFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering

public class OpacityFilter
extends PointFilter
implements DynFiltering

Sets the opacity (alpha) of every pixel in an image to a constant value.


Constructor Summary
OpacityFilter()
          Construct an OpacityFilter with 50% opacity.
OpacityFilter(int opacity)
          Construct an OpacityFilter with the given opacity (alpha).
 
Method Summary
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 int filterRGB(int x, int y, int rgb)
           
 int getOpacity()
          Get the opacity setting.
 void setOpacity(int opacity)
          Set the opacity.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.PointFilter
filter, setDimensions
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpacityFilter

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


OpacityFilter

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

Parameters:
opacity - the opacity (alpha) in the range 0..255
Method Detail

setOpacity

public void setOpacity(int opacity)
Set the opacity.

Parameters:
opacity - the opacity (alpha) in the range 0..255
See Also:
getOpacity()

getOpacity

public int getOpacity()
Get the opacity setting.

Returns:
the opacity
See Also:
setOpacity(int)

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Specified by:
filterRGB in class PointFilter

toString

public String toString()
Overrides:
toString in class Object

filter

public BufferedImage filter(BufferedImage src,
                            Struct parameters)
                     throws PageException
Specified by:
filter in interface DynFiltering
Overrides:
filter in class PointFilter
Throws:
PageException


Copyright © 2012 Railo