railo.runtime.img.filter
Class StampFilter

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

public class StampFilter
extends PointFilter
implements DynFiltering

A filter which produces a rubber-stamp type of effect by performing a thresholded blur.


Constructor Summary
StampFilter()
          Construct a StampFilter.
StampFilter(float threshold)
          Construct a StampFilter.
 
Method Summary
 BufferedImage filter(BufferedImage src, BufferedImage dst)
           
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 int filterRGB(int x, int y, int rgb)
           
 int getBlack()
          Set the color to be used for pixels below the lower threshold.
 float getRadius()
          Get the radius of the effect.
 float getSoftness()
          Get the softness of the effect.
 float getThreshold()
          Get the threshold value.
 int getWhite()
          Get the color to be used for pixels above the upper threshold.
 void setBlack(Color black)
          Set the color to be used for pixels below the lower threshold.
 void setRadius(float radius)
          Set the radius of the effect.
 void setSoftness(float softness)
          Set the softness of the effect in the range 0..1.
 void setThreshold(float threshold)
          Set the threshold value.
 void setWhite(Color white)
          Set the color to be used for pixels above the upper threshold.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.PointFilter
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

StampFilter

public StampFilter()
Construct a StampFilter.


StampFilter

public StampFilter(float threshold)
Construct a StampFilter.

Parameters:
threshold - the threshold value
Method Detail

setRadius

public void setRadius(float radius)
Set the radius of the effect.

Parameters:
radius - the radius
See Also:
getRadius()

getRadius

public float getRadius()
Get the radius of the effect.

Returns:
the radius
See Also:
setRadius(float)

setThreshold

public void setThreshold(float threshold)
Set the threshold value.

Parameters:
threshold - the threshold value
See Also:
getThreshold()

getThreshold

public float getThreshold()
Get the threshold value.

Returns:
the threshold value
See Also:
setThreshold(float)

setSoftness

public void setSoftness(float softness)
Set the softness of the effect in the range 0..1.

Parameters:
softness - the softness
See Also:
getSoftness()

getSoftness

public float getSoftness()
Get the softness of the effect.

Returns:
the softness
See Also:
setSoftness(float)

setWhite

public void setWhite(Color white)
Set the color to be used for pixels above the upper threshold.

Parameters:
white - the color
See Also:
getWhite()

getWhite

public int getWhite()
Get the color to be used for pixels above the upper threshold.

Returns:
the color
See Also:
setWhite(java.awt.Color)

setBlack

public void setBlack(Color black)
Set the color to be used for pixels below the lower threshold.

Parameters:
black - the color
See Also:
getBlack()

getBlack

public int getBlack()
Set the color to be used for pixels below the lower threshold.

Returns:
the color
See Also:
setBlack(java.awt.Color)

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Specified by:
filter in interface BufferedImageOp
Overrides:
filter in class PointFilter

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