com.jhlabs.image
Class ApplyMaskFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by com.jhlabs.image.ApplyMaskFilter
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.lang.Cloneable

public class ApplyMaskFilter
extends AbstractBufferedImageOp

A filter which uses the alpha channel of a "mask" image to interpolate between a source and destination image.


Constructor Summary
ApplyMaskFilter()
          Construct an ApplyMaskFIlter.
ApplyMaskFilter(java.awt.image.BufferedImage maskImage, java.awt.image.BufferedImage destination)
          Construct an ApplyMaskFIlter.
 
Method Summary
static void composeThroughMask(java.awt.image.Raster src, java.awt.image.WritableRaster dst, java.awt.image.Raster sel)
          Interpolates between two rasters according to the alpha level of a mask raster.
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
           
 java.awt.image.BufferedImage getDestination()
          Get the destination image.
 java.awt.image.BufferedImage getMaskImage()
          Get the mask image.
 void setDestination(java.awt.image.BufferedImage destination)
          Set the destination image.
 void setMaskImage(java.awt.image.BufferedImage maskImage)
          Set the mask image.
 java.lang.String toString()
           
 
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplyMaskFilter

public ApplyMaskFilter()
Construct an ApplyMaskFIlter.


ApplyMaskFilter

public ApplyMaskFilter(java.awt.image.BufferedImage maskImage,
                       java.awt.image.BufferedImage destination)
Construct an ApplyMaskFIlter.

Parameters:
maskImage - the mask image
destination - the destination image
Method Detail

setDestination

public void setDestination(java.awt.image.BufferedImage destination)
Set the destination image.

Parameters:
destination - the destination image
See Also:
getDestination()

getDestination

public java.awt.image.BufferedImage getDestination()
Get the destination image.

Returns:
the destination image
See Also:
setDestination(java.awt.image.BufferedImage)

setMaskImage

public void setMaskImage(java.awt.image.BufferedImage maskImage)
Set the mask image.

Parameters:
maskImage - the mask image
See Also:
getMaskImage()

getMaskImage

public java.awt.image.BufferedImage getMaskImage()
Get the mask image.

Returns:
the mask image
See Also:
setMaskImage(java.awt.image.BufferedImage)

composeThroughMask

public static void composeThroughMask(java.awt.image.Raster src,
                                      java.awt.image.WritableRaster dst,
                                      java.awt.image.Raster sel)
Interpolates between two rasters according to the alpha level of a mask raster.

Parameters:
src - the source raster
dst - the destination raster
sel - the mask raster

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                           java.awt.image.BufferedImage dst)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object