Class CalGrayColor

java.lang.Object
java.awt.color.ColorSpace
com.sun.pdfview.colorspace.CalGrayColor
All Implemented Interfaces:
Serializable

public class CalGrayColor extends ColorSpace
A ColorSpace for calibrated gray
See Also:
  • Field Details

    • white

      float[] white
    • black

      float[] black
    • gamma

      float gamma
    • cie

      static ColorSpace cie
  • 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
    • 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
      Parameters:
      comp - the gray value (0-1)
      Returns:
      the RGB values (0-1)
    • 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