Package com.sun.pdfview.colorspace
Class CalGrayColor
- java.lang.Object
-
- java.awt.color.ColorSpace
-
- com.sun.pdfview.colorspace.CalGrayColor
-
- All Implemented Interfaces:
java.io.Serializable
public class CalGrayColor extends java.awt.color.ColorSpaceA ColorSpace for calibrated gray- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) float[]black(package private) static java.awt.color.ColorSpacecie(package private) floatgamma(package private) float[]white-
Fields inherited from class java.awt.color.ColorSpace
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
-
-
Constructor Summary
Constructors Constructor Description CalGrayColor()Create a new calibrated gray color space object, with the default values for black point, white point and gammaCalGrayColor(PDFObject obj)Create a new Calibrated Gray color space object, given the description in a PDF dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]fromCIEXYZ(float[] colorvalue)convert from CIEXYZ to Calibrated Gray.float[]fromRGB(float[] rgbvalue)convert from RGB to Calibrated Gray.intgetNumComponents()get the number of components (1).intgetType()get the type of this ColorSpace (TYPE_GRAY)float[]toCIEXYZ(float[] colorvalue)convert from Calibrated Gray to CIEXYZ.float[]toRGB(float[] comp)convert from Calibrated Gray to RGB.
-
-
-
Constructor Detail
-
CalGrayColor
public CalGrayColor(PDFObject obj) throws java.io.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:
java.io.IOException
-
CalGrayColor
public CalGrayColor()
Create a new calibrated gray color space object, with the default values for black point, white point and gamma
-
-
Method Detail
-
getNumComponents
public int getNumComponents()
get the number of components (1).- Overrides:
getNumComponentsin classjava.awt.color.ColorSpace
-
toRGB
public float[] toRGB(float[] comp)
convert from Calibrated Gray to RGB.- Specified by:
toRGBin classjava.awt.color.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:
fromRGBin classjava.awt.color.ColorSpace
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] colorvalue)
convert from CIEXYZ to Calibrated Gray. NOT IMPLEMENTED- Specified by:
fromCIEXYZin classjava.awt.color.ColorSpace
-
getType
public int getType()
get the type of this ColorSpace (TYPE_GRAY)- Overrides:
getTypein classjava.awt.color.ColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue)
convert from Calibrated Gray to CIEXYZ. NOT IMPLEMENTED- Specified by:
toCIEXYZin classjava.awt.color.ColorSpace
-
-