Class ColorMatrixRable8Bit
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.ColorMatrixRable8Bit
- All Implemented Interfaces:
RenderableImage
,ColorMatrixRable
,Filter
,FilterColorInterpolation
public final class ColorMatrixRable8Bit
extends AbstractColorInterpolationRable
implements ColorMatrixRable
Implements the interface expected from a color matrix
operation
- Version:
- $Id: ColorMatrixRable8Bit.java 1808977 2017-09-20 09:06:07Z ssteiner $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float[][]
The matrixprivate static float[][]
Predefined luminanceToAlpha matrixprivate int
This matrix typeFields 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 org.apache.batik.ext.awt.image.renderable.ColorMatrixRable
TYPE_HUE_ROTATE, TYPE_LUMINANCE_TO_ALPHA, TYPE_MATRIX, TYPE_SATURATE
Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Instances should be built through the static factory methods -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorMatrixRable
buildHueRotate
(float a) Builds a TYPE_HUE_ROTATE instance.static ColorMatrixRable
Builds a TYPE_LUMINANCE_TO_ALPHA instancestatic ColorMatrixRable
buildMatrix
(float[][] matrix) Builds a TYPE_MATRIX instancestatic ColorMatrixRable
buildSaturate
(float s) Builds a TYPE_SATURATE instancefloat[][]
Returns the rows of the color matrix.Returns the source of the blur operationint
getType()
Returns the type of this color matrix.void
Sets the source of the blur operationMethods 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
-
MATRIX_LUMINANCE_TO_ALPHA
private static float[][] MATRIX_LUMINANCE_TO_ALPHAPredefined luminanceToAlpha matrix -
type
private int typeThis matrix type -
matrix
private float[][] matrixThe matrix
-
-
Constructor Details
-
ColorMatrixRable8Bit
private ColorMatrixRable8Bit()Instances should be built through the static factory methods
-
-
Method Details
-
setSource
Sets the source of the blur operation- Specified by:
setSource
in interfaceColorMatrixRable
- Parameters:
src
- image to offset.
-
getSource
Returns the source of the blur operation- Specified by:
getSource
in interfaceColorMatrixRable
-
getType
public int getType()Returns the type of this color matrix.- Specified by:
getType
in interfaceColorMatrixRable
- Returns:
- one of TYPE_MATRIX, TYPE_SATURATE, TYPE_HUE_ROTATE, TYPE_LUMINANCE_TO_ALPHA
-
getMatrix
public float[][] getMatrix()Returns the rows of the color matrix. This uses the same convention as BandCombineOp.- Specified by:
getMatrix
in interfaceColorMatrixRable
-
buildMatrix
Builds a TYPE_MATRIX instance -
buildSaturate
Builds a TYPE_SATURATE instance -
buildHueRotate
Builds a TYPE_HUE_ROTATE instance.- Parameters:
a
- angle, in radian
-
buildLuminanceToAlpha
Builds a TYPE_LUMINANCE_TO_ALPHA instance -
createRendering
- Specified by:
createRendering
in interfaceRenderableImage
-