Class PDFIndexedColorSpace

java.lang.Object
java.awt.color.ColorSpace
com.inductiveautomation.rm.pdf.reader.PDFIndexedColorSpace
All Implemented Interfaces:
Serializable

public class PDFIndexedColorSpace extends ColorSpace
PDFIndexedColorSpace

The PDFIndexedColorSpace is an awt ColorSpace subclass which represents a pdf indexed colorspace. Colors are chosen by specifying an index into a color table. The table consists of colors within an arbitrary base ColorSpace. The actual data in the table are bytes specifying components in the base colorspace.

For example: [/Indexed /DeviceRGB 2 <000000FFFFFF0000FF>]

See Also:
  • Constructor Details

    • PDFIndexedColorSpace

      public PDFIndexedColorSpace(ColorSpace base, int hival, byte[] comps)
      Create PDFIndexedColorSpace.
    • PDFIndexedColorSpace

      public PDFIndexedColorSpace(ColorSpace base, int hival, boolean alpha, byte[] comps)
      Create PDFIndexedColorSpace.
  • Method Details

    • getMinValue

      public float getMinValue(int i)
      colors in an indexed colorspace are ints in the range 0->numColors-1
      Overrides:
      getMinValue in class ColorSpace
    • getMaxValue

      public float getMaxValue(int i)
      Overrides:
      getMaxValue in class ColorSpace
    • toRGB

      public float[] toRGB(float[] colorvalue)
      Specified by:
      toRGB in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      Specified by:
      fromRGB in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)
      Specified by:
      toCIEXYZ in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)
      Specified by:
      fromCIEXYZ in class ColorSpace