Class LabColor

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

public class LabColor extends ColorSpace
A ColorSpace for Lab color
See Also:
  • Field Details

    • white

      float[] white
    • black

      float[] black
    • range

      float[] range
    • cie

      static ColorSpace cie
  • Constructor Details

    • LabColor

      public LabColor(PDFObject obj) throws IOException
      Create a new Lab 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 an array of 4 Numbers for "Range".
      Throws:
      IOException
  • Method Details

    • getNumComponents

      public int getNumComponents()
      get the number of components for this color space (3)
      Overrides:
      getNumComponents in class ColorSpace
    • stage2

      public final float stage2(float s1)
      Stage 2 of the conversion algorithm. Pulled out because it gets invoked for each component
    • toRGB

      public float[] toRGB(float[] comp)
      convert from Lab to RGB
      Specified by:
      toRGB in class ColorSpace
      Parameters:
      comp - the Lab values (0-1)
      Returns:
      the RGB values (0-1)
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      convert from RGB to Lab. NOT IMPLEMENTED
      Specified by:
      fromRGB in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)
      convert from CIEXYZ to Lab. NOT IMPLEMENTED
      Specified by:
      fromCIEXYZ in class ColorSpace
    • getType

      public int getType()
      get the type of this colorspace (TYPE_Lab)
      Overrides:
      getType in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)
      convert from Lab to CIEXYZ. NOT IMPLEMENTED
      Specified by:
      toCIEXYZ in class ColorSpace