org.apache.batik.ext.awt.image.renderable
Class ConvolveMatrixRable8Bit
java.lang.Object
|
+--org.apache.batik.ext.awt.image.renderable.AbstractRable
|
+--org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
|
+--org.apache.batik.ext.awt.image.renderable.ConvolveMatrixRable8Bit
- All Implemented Interfaces:
- ConvolveMatrixRable, Filter, FilterColorInterpolation, java.awt.image.renderable.RenderableImage
- 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.
Fields inherited from interface java.awt.image.renderable.RenderableImage |
HINTS_OBSERVED |
Method Summary |
java.awt.image.RenderedImage |
createRendering(java.awt.image.renderable.RenderContext rc)
|
void |
fixAlpha_FALLBACK(java.awt.image.WritableRaster wr)
|
void |
fixAlpha_INT_PACK(java.awt.image.WritableRaster wr)
|
void |
fixAlpha(java.awt.image.BufferedImage bi)
|
double |
getBias()
Returns the shift value to apply to the result of convolution |
PadMode |
getEdgeMode()
Returns the current edge handling mode. |
java.awt.image.Kernel |
getKernel()
Returns the Convolution Kernel in use |
double[] |
getKernelUnitLength()
Returns the [x,y] distance in user space between kernel values |
boolean |
getPreserveAlpha()
Returns false if the convolution should affect the Alpha channel |
Filter |
getSource()
Returns the source to be Convolved |
java.awt.Point |
getTarget()
Returns the target point of the kernel (what pixel under the kernel
should be set to the result of convolution). |
void |
setBias(double bias)
Returns the shift value to apply to the result of convolution |
void |
setEdgeMode(PadMode edgeMode)
Sets the current edge handling mode. |
void |
setKernel(java.awt.image.Kernel k)
Sets the Convolution Kernel to use. |
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. |
void |
setPreserveAlpha(boolean preserveAlpha)
Sets Alpha channel handling. |
void |
setSource(Filter src)
Sets the source to be Convolved |
void |
setTarget(java.awt.Point pt)
Sets the target point of the kernel (what pixel under the kernel
should be set to the result of the convolution). |
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable |
createDefaultRendering, createScaledRendering, getBounds2D, getDependencyRegion, getDirtyRegion, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getTimeStamp, getWidth, init, init, init, init, isDynamic, touch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.image.renderable.RenderableImage |
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic |
ConvolveMatrixRable8Bit
public ConvolveMatrixRable8Bit(Filter source)
getSource
public Filter getSource()
- Description copied from interface:
ConvolveMatrixRable
- Returns the source to be Convolved
- Specified by:
getSource
in interface ConvolveMatrixRable
setSource
public void setSource(Filter src)
- Description copied from interface:
ConvolveMatrixRable
- Sets the source to be Convolved
- Specified by:
setSource
in interface ConvolveMatrixRable
- Following copied from interface:
org.apache.batik.ext.awt.image.renderable.ConvolveMatrixRable
- Parameters:
src
- image to Convolved.
getKernel
public java.awt.image.Kernel getKernel()
- Returns the Convolution Kernel in use
- Specified by:
getKernel
in interface ConvolveMatrixRable
setKernel
public void setKernel(java.awt.image.Kernel k)
- Sets the Convolution Kernel to use.
- Specified by:
setKernel
in interface ConvolveMatrixRable
- Parameters:
k
- Kernel to use for convolution.
getTarget
public java.awt.Point getTarget()
- Description copied from interface:
ConvolveMatrixRable
- Returns the target point of the kernel (what pixel under the kernel
should be set to the result of convolution).
- Specified by:
getTarget
in interface ConvolveMatrixRable
setTarget
public void setTarget(java.awt.Point pt)
- Description copied from interface:
ConvolveMatrixRable
- Sets the target point of the kernel (what pixel under the kernel
should be set to the result of the convolution).
- Specified by:
setTarget
in interface ConvolveMatrixRable
getBias
public double getBias()
- Returns the shift value to apply to the result of convolution
- Specified by:
getBias
in interface ConvolveMatrixRable
setBias
public void setBias(double bias)
- Returns the shift value to apply to the result of convolution
- Specified by:
setBias
in interface ConvolveMatrixRable
getEdgeMode
public PadMode getEdgeMode()
- Returns the current edge handling mode.
- Specified by:
getEdgeMode
in interface ConvolveMatrixRable
setEdgeMode
public void setEdgeMode(PadMode edgeMode)
- Sets the current edge handling mode.
- Specified by:
setEdgeMode
in interface ConvolveMatrixRable
getKernelUnitLength
public double[] getKernelUnitLength()
- Returns the [x,y] distance in user space between kernel values
- Specified by:
getKernelUnitLength
in interface ConvolveMatrixRable
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.
- Specified by:
setKernelUnitLength
in interface ConvolveMatrixRable
getPreserveAlpha
public boolean getPreserveAlpha()
- Returns false if the convolution should affect the Alpha channel
- Specified by:
getPreserveAlpha
in interface ConvolveMatrixRable
setPreserveAlpha
public void setPreserveAlpha(boolean preserveAlpha)
- Sets Alpha channel handling.
A value of False indicates that the convolution should apply to
the Alpha Channel
- Specified by:
setPreserveAlpha
in interface ConvolveMatrixRable
fixAlpha
public void fixAlpha(java.awt.image.BufferedImage bi)
fixAlpha_INT_PACK
public void fixAlpha_INT_PACK(java.awt.image.WritableRaster wr)
fixAlpha_FALLBACK
public void fixAlpha_FALLBACK(java.awt.image.WritableRaster wr)
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
- Specified by:
createRendering
in interface java.awt.image.renderable.RenderableImage
Copyright © 2002 Apache Software Foundation. All Rights Reserved.