Class 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 Details

    • MATRIX_LUMINANCE_TO_ALPHA

      private static float[][] MATRIX_LUMINANCE_TO_ALPHA
      Predefined luminanceToAlpha matrix
    • type

      private int type
      This matrix type
    • matrix

      private float[][] matrix
      The matrix
  • Constructor Details

    • ColorMatrixRable8Bit

      private ColorMatrixRable8Bit()
      Instances should be built through the static factory methods
  • Method Details

    • setSource

      public void setSource(Filter src)
      Sets the source of the blur operation
      Specified by:
      setSource in interface ColorMatrixRable
      Parameters:
      src - image to offset.
    • getSource

      public Filter getSource()
      Returns the source of the blur operation
      Specified by:
      getSource in interface ColorMatrixRable
    • getType

      public int getType()
      Returns the type of this color matrix.
      Specified by:
      getType in interface ColorMatrixRable
      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 interface ColorMatrixRable
    • 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 RenderedImage createRendering(RenderContext rc)
      Specified by:
      createRendering in interface RenderableImage