Class CalGrayColor

java.lang.Object
java.awt.color.ColorSpace
org.loboevolution.pdfview.colorspace.CalGrayColor
All Implemented Interfaces:
Serializable

public class CalGrayColor extends ColorSpace
A ColorSpace for calibrated gray

Author Mike Wessler

See Also:
  • Constructor Details

    • CalGrayColor

      public CalGrayColor(PDFObject obj) throws IOException
      Create a new Calibrated Gray color space object, given the description in a PDF dictionary.
      Parameters:
      obj - a dictionary that contains an Array of 3 Numbers for "WhitePoint" and "BlackPoint", and a Number for "Gamma"
      Throws:
      IOException - if any.
    • CalGrayColor

      public CalGrayColor()
      Create a new calibrated gray color space object, with the default values for black point, white point and gamma
  • Method Details

    • getNumComponents

      public int getNumComponents()

      get the number of components (1).

      Overrides:
      getNumComponents in class ColorSpace
    • toRGB

      public float[] toRGB(float[] comp)

      convert from Calibrated Gray to RGB.

      Specified by:
      toRGB in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)

      convert from RGB to Calibrated Gray. NOT IMPLEMENTED

      Specified by:
      fromRGB in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)

      convert from CIEXYZ to Calibrated Gray. NOT IMPLEMENTED

      Specified by:
      fromCIEXYZ in class ColorSpace
    • getType

      public int getType()

      get the type of this ColorSpace (TYPE_GRAY)

      Overrides:
      getType in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)

      convert from Calibrated Gray to CIEXYZ. NOT IMPLEMENTED

      Specified by:
      toCIEXYZ in class ColorSpace