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:
java.awt.image.renderable.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
Fields Modifier and Type Field Description private float[][]matrixThe matrixprivate static float[][]MATRIX_LUMINANCE_TO_ALPHAPredefined luminanceToAlpha matrixprivate inttypeThis matrix type-
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 org.apache.batik.ext.awt.image.renderable.ColorMatrixRable
TYPE_HUE_ROTATE, TYPE_LUMINANCE_TO_ALPHA, TYPE_MATRIX, TYPE_SATURATE
-
-
Constructor Summary
Constructors Modifier Constructor Description privateColorMatrixRable8Bit()Instances should be built through the static factory methods
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColorMatrixRablebuildHueRotate(float a)Builds a TYPE_HUE_ROTATE instance.static ColorMatrixRablebuildLuminanceToAlpha()Builds a TYPE_LUMINANCE_TO_ALPHA instancestatic ColorMatrixRablebuildMatrix(float[][] matrix)Builds a TYPE_MATRIX instancestatic ColorMatrixRablebuildSaturate(float s)Builds a TYPE_SATURATE instancejava.awt.image.RenderedImagecreateRendering(java.awt.image.renderable.RenderContext rc)float[][]getMatrix()Returns the rows of the color matrix.FiltergetSource()Returns the source of the blur operationintgetType()Returns the type of this color matrix.voidsetSource(Filter src)Sets the source of the blur operation-
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
-
-
-
-
Method Detail
-
setSource
public void setSource(Filter src)
Sets the source of the blur operation- Specified by:
setSourcein interfaceColorMatrixRable- Parameters:
src- image to offset.
-
getSource
public Filter 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
public static ColorMatrixRable buildMatrix(float[][] matrix)
Builds a TYPE_MATRIX instance
-
buildSaturate
public static ColorMatrixRable buildSaturate(float s)
Builds a TYPE_SATURATE instance
-
buildHueRotate
public static ColorMatrixRable buildHueRotate(float a)
Builds a TYPE_HUE_ROTATE instance.- Parameters:
a- angle, in radian
-
buildLuminanceToAlpha
public static ColorMatrixRable buildLuminanceToAlpha()
Builds a TYPE_LUMINANCE_TO_ALPHA instance
-
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
- Specified by:
createRenderingin interfacejava.awt.image.renderable.RenderableImage
-
-