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 intThis matrix typeFields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinearFields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stampFields inherited from interface org.apache.batik.ext.awt.image.renderable.ColorMatrixRable
TYPE_HUE_ROTATE, TYPE_LUMINANCE_TO_ALPHA, TYPE_MATRIX, TYPE_SATURATEFields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInstances should be built through the static factory methods -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorMatrixRablebuildHueRotate(float a) Builds a TYPE_HUE_ROTATE instance.static ColorMatrixRableBuilds a TYPE_LUMINANCE_TO_ALPHA instancestatic ColorMatrixRablebuildMatrix(float[][] matrix) Builds a TYPE_MATRIX instancestatic ColorMatrixRablebuildSaturate(float s) Builds a TYPE_SATURATE instancefloat[][]Returns the rows of the color matrix.Returns the source of the blur operationintgetType()Returns the type of this color matrix.voidSets the source of the blur operationMethods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinearMethods 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, touchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.batik.ext.awt.image.renderable.Filter
getBounds2D, getDependencyRegion, getDirtyRegion, getTimeStampMethods inherited from interface org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinearMethods 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:
setSourcein interfaceColorMatrixRable- Parameters:
src- image to offset.
-
getSource
Returns the source of the blur operation- Specified by:
getSourcein interfaceColorMatrixRable
-
getType
public int getType()Returns the type of this color matrix.- Specified by:
getTypein 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:
getMatrixin 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:
createRenderingin interfaceRenderableImage
-