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:
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
private ComponentTransferFunction[]
Array of transfer functions.static final int
static final int
private TransferFunction[]
Array 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
Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
-
Constructor Summary
ConstructorsConstructorDescriptionComponentTransferRable8Bit
(Filter src, ComponentTransferFunction alphaFunction, ComponentTransferFunction redFunction, ComponentTransferFunction greenFunction, ComponentTransferFunction blueFunction) -
Method Summary
Modifier and TypeMethodDescriptionReturns the transfer function for the alpha channelReturns the transfer function for the blue channelReturns the transfer function for the green channelReturns the transfer function for the red channelReturns the source of the blur operationprivate static TransferFunction
getTransferFunction
(ComponentTransferFunction function) Converts a ComponentTransferFunction to a TransferFunctionprivate TransferFunction[]
Builds an array of transfer functions for the ComponentTransferOp.void
setAlphaFunction
(ComponentTransferFunction alphaFunction) Sets the transfer function for the alpha channelvoid
setBlueFunction
(ComponentTransferFunction blueFunction) Sets the transfer function for the blue channelvoid
setGreenFunction
(ComponentTransferFunction greenFunction) Sets the transfer function for the green channelvoid
setRedFunction
(ComponentTransferFunction redFunction) Sets the transfer function for the red channelvoid
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
Methods inherited from interface java.awt.image.renderable.RenderableImage
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
-
Field Details
-
ALPHA
public static final int ALPHA- See Also:
-
RED
public static final int RED- See Also:
-
GREEN
public static final int GREEN- See Also:
-
BLUE
public static final int BLUE- See Also:
-
functions
Array of transfer functions. There are four elements. Elements may be null. -
txfFunc
Array of transfer functions. Elements are computed lazily.
-
-
Constructor Details
-
ComponentTransferRable8Bit
public ComponentTransferRable8Bit(Filter src, ComponentTransferFunction alphaFunction, ComponentTransferFunction redFunction, ComponentTransferFunction greenFunction, ComponentTransferFunction blueFunction)
-
-
Method Details
-
setSource
Sets the source of the blur operation- Specified by:
setSource
in interfaceComponentTransferRable
- Parameters:
src
- image to offset.
-
getSource
Returns the source of the blur operation- Specified by:
getSource
in interfaceComponentTransferRable
-
getAlphaFunction
Returns the transfer function for the alpha channel- Specified by:
getAlphaFunction
in interfaceComponentTransferRable
-
setAlphaFunction
Sets the transfer function for the alpha channel- Specified by:
setAlphaFunction
in interfaceComponentTransferRable
-
getRedFunction
Returns the transfer function for the red channel- Specified by:
getRedFunction
in interfaceComponentTransferRable
-
setRedFunction
Sets the transfer function for the red channel- Specified by:
setRedFunction
in interfaceComponentTransferRable
-
getGreenFunction
Returns the transfer function for the green channel- Specified by:
getGreenFunction
in interfaceComponentTransferRable
-
setGreenFunction
Sets the transfer function for the green channel- Specified by:
setGreenFunction
in interfaceComponentTransferRable
-
getBlueFunction
Returns the transfer function for the blue channel- Specified by:
getBlueFunction
in interfaceComponentTransferRable
-
setBlueFunction
Sets the transfer function for the blue channel- Specified by:
setBlueFunction
in interfaceComponentTransferRable
-
createRendering
- Specified by:
createRendering
in interfaceRenderableImage
-
getTransferFunctions
Builds an array of transfer functions for the ComponentTransferOp. -
getTransferFunction
Converts a ComponentTransferFunction to a TransferFunction -
tableFloatToInt
private static int[] tableFloatToInt(float[] tableValues) Converts a intensity values (0-1) to code values (0-255)
-