org.apache.batik.ext.awt.image.renderable

Class ConvolveMatrixRable8Bit

public class ConvolveMatrixRable8Bit extends AbstractColorInterpolationRable implements ConvolveMatrixRable

Convolves an image with a convolution matrix. Known limitations: Does not support bias other than zero - pending 16bit pathway Does not support edgeMode="wrap" - pending Tile code.
Constructor Summary
ConvolveMatrixRable8Bit(Filter source)
Method Summary
RenderedImagecreateRendering(RenderContext rc)
voidfixAlpha(BufferedImage bi)
voidfixAlpha_FALLBACK(WritableRaster wr)
voidfixAlpha_INT_PACK(WritableRaster wr)
doublegetBias()
Returns the shift value to apply to the result of convolution
PadModegetEdgeMode()
Returns the current edge handling mode.
KernelgetKernel()
Returns the Convolution Kernel in use
double[]getKernelUnitLength()
Returns the [x,y] distance in user space between kernel values
booleangetPreserveAlpha()
Returns false if the convolution should affect the Alpha channel
FiltergetSource()
PointgetTarget()
voidsetBias(double bias)
Returns the shift value to apply to the result of convolution
voidsetEdgeMode(PadMode edgeMode)
Sets the current edge handling mode.
voidsetKernel(Kernel k)
Sets the Convolution Kernel to use.
voidsetKernelUnitLength(double[] kernelUnitLength)
Sets the [x,y] distance in user space between kernel values If set to zero then device space will be used.
voidsetPreserveAlpha(boolean preserveAlpha)
Sets Alpha channel handling.
voidsetSource(Filter src)
voidsetTarget(Point pt)

Constructor Detail

ConvolveMatrixRable8Bit

public ConvolveMatrixRable8Bit(Filter source)

Method Detail

createRendering

public RenderedImage createRendering(RenderContext rc)

fixAlpha

public void fixAlpha(BufferedImage bi)

fixAlpha_FALLBACK

public void fixAlpha_FALLBACK(WritableRaster wr)

fixAlpha_INT_PACK

public void fixAlpha_INT_PACK(WritableRaster wr)

getBias

public double getBias()
Returns the shift value to apply to the result of convolution

getEdgeMode

public PadMode getEdgeMode()
Returns the current edge handling mode.

getKernel

public Kernel getKernel()
Returns the Convolution Kernel in use

getKernelUnitLength

public double[] getKernelUnitLength()
Returns the [x,y] distance in user space between kernel values

getPreserveAlpha

public boolean getPreserveAlpha()
Returns false if the convolution should affect the Alpha channel

getSource

public Filter getSource()

getTarget

public Point getTarget()

setBias

public void setBias(double bias)
Returns the shift value to apply to the result of convolution

setEdgeMode

public void setEdgeMode(PadMode edgeMode)
Sets the current edge handling mode.

setKernel

public void setKernel(Kernel k)
Sets the Convolution Kernel to use.

Parameters: k Kernel to use for convolution.

setKernelUnitLength

public void setKernelUnitLength(double[] kernelUnitLength)
Sets the [x,y] distance in user space between kernel values If set to zero then device space will be used.

setPreserveAlpha

public void setPreserveAlpha(boolean preserveAlpha)
Sets Alpha channel handling. A value of False indicates that the convolution should apply to the Alpha Channel

setSource

public void setSource(Filter src)

setTarget

public void setTarget(Point pt)
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.