Class ComponentTransferRable8Bit
- 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.ComponentTransferRable8Bit
-
- All Implemented Interfaces:
java.awt.image.renderable.RenderableImage,ComponentTransferRable,Filter,FilterColorInterpolation
public class ComponentTransferRable8Bit extends AbstractColorInterpolationRable implements ComponentTransferRable
This class implements the interface expected from a component transfer operation.- Version:
- $Id: ComponentTransferRable8Bit.java 1808888 2017-09-19 14:22:11Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description static intALPHAstatic intBLUEprivate ComponentTransferFunction[]functionsArray of transfer functions.static intGREENstatic intREDprivate TransferFunction[]txfFuncArray of transfer functions.-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinear
-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stamp
-
-
Constructor Summary
Constructors Constructor Description ComponentTransferRable8Bit(Filter src, ComponentTransferFunction alphaFunction, ComponentTransferFunction redFunction, ComponentTransferFunction greenFunction, ComponentTransferFunction blueFunction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.RenderedImagecreateRendering(java.awt.image.renderable.RenderContext rc)ComponentTransferFunctiongetAlphaFunction()Returns the transfer function for the alpha channelComponentTransferFunctiongetBlueFunction()Returns the transfer function for the blue channelComponentTransferFunctiongetGreenFunction()Returns the transfer function for the green channelComponentTransferFunctiongetRedFunction()Returns the transfer function for the red channelFiltergetSource()Returns the source of the blur operationprivate static TransferFunctiongetTransferFunction(ComponentTransferFunction function)Converts a ComponentTransferFunction to a TransferFunctionprivate TransferFunction[]getTransferFunctions()Builds an array of transfer functions for the ComponentTransferOp.voidsetAlphaFunction(ComponentTransferFunction alphaFunction)Sets the transfer function for the alpha channelvoidsetBlueFunction(ComponentTransferFunction blueFunction)Sets the transfer function for the blue channelvoidsetGreenFunction(ComponentTransferFunction greenFunction)Sets the transfer function for the green channelvoidsetRedFunction(ComponentTransferFunction redFunction)Sets the transfer function for the red channelvoidsetSource(Filter src)Sets the source of the blur operationprivate static int[]tableFloatToInt(float[] tableValues)Converts a intensity values (0-1) to code values (0-255)-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
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 org.apache.batik.ext.awt.image.renderable.Filter
getBounds2D, getDependencyRegion, getDirtyRegion, getTimeStamp
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
-
-
-
Field Detail
-
ALPHA
public static final int ALPHA
- See Also:
- Constant Field Values
-
RED
public static final int RED
- See Also:
- Constant Field Values
-
GREEN
public static final int GREEN
- See Also:
- Constant Field Values
-
BLUE
public static final int BLUE
- See Also:
- Constant Field Values
-
functions
private ComponentTransferFunction[] functions
Array of transfer functions. There are four elements. Elements may be null.
-
txfFunc
private TransferFunction[] txfFunc
Array of transfer functions. Elements are computed lazily.
-
-
Constructor Detail
-
ComponentTransferRable8Bit
public ComponentTransferRable8Bit(Filter src, ComponentTransferFunction alphaFunction, ComponentTransferFunction redFunction, ComponentTransferFunction greenFunction, ComponentTransferFunction blueFunction)
-
-
Method Detail
-
setSource
public void setSource(Filter src)
Sets the source of the blur operation- Specified by:
setSourcein interfaceComponentTransferRable- Parameters:
src- image to offset.
-
getSource
public Filter getSource()
Returns the source of the blur operation- Specified by:
getSourcein interfaceComponentTransferRable
-
getAlphaFunction
public ComponentTransferFunction getAlphaFunction()
Returns the transfer function for the alpha channel- Specified by:
getAlphaFunctionin interfaceComponentTransferRable
-
setAlphaFunction
public void setAlphaFunction(ComponentTransferFunction alphaFunction)
Sets the transfer function for the alpha channel- Specified by:
setAlphaFunctionin interfaceComponentTransferRable
-
getRedFunction
public ComponentTransferFunction getRedFunction()
Returns the transfer function for the red channel- Specified by:
getRedFunctionin interfaceComponentTransferRable
-
setRedFunction
public void setRedFunction(ComponentTransferFunction redFunction)
Sets the transfer function for the red channel- Specified by:
setRedFunctionin interfaceComponentTransferRable
-
getGreenFunction
public ComponentTransferFunction getGreenFunction()
Returns the transfer function for the green channel- Specified by:
getGreenFunctionin interfaceComponentTransferRable
-
setGreenFunction
public void setGreenFunction(ComponentTransferFunction greenFunction)
Sets the transfer function for the green channel- Specified by:
setGreenFunctionin interfaceComponentTransferRable
-
getBlueFunction
public ComponentTransferFunction getBlueFunction()
Returns the transfer function for the blue channel- Specified by:
getBlueFunctionin interfaceComponentTransferRable
-
setBlueFunction
public void setBlueFunction(ComponentTransferFunction blueFunction)
Sets the transfer function for the blue channel- Specified by:
setBlueFunctionin interfaceComponentTransferRable
-
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
- Specified by:
createRenderingin interfacejava.awt.image.renderable.RenderableImage
-
getTransferFunctions
private TransferFunction[] getTransferFunctions()
Builds an array of transfer functions for the ComponentTransferOp.
-
getTransferFunction
private static TransferFunction getTransferFunction(ComponentTransferFunction function)
Converts a ComponentTransferFunction to a TransferFunction
-
tableFloatToInt
private static int[] tableFloatToInt(float[] tableValues)
Converts a intensity values (0-1) to code values (0-255)
-
-