Class CalGrayColor
java.lang.Object
java.awt.color.ColorSpace
org.loboevolution.pdfview.colorspace.CalGrayColor
- All Implemented Interfaces:
Serializable
A ColorSpace for calibrated gray
Author Mike Wessler
- See Also:
-
Field Summary
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
ConstructorDescriptionCreate 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
Modifier and TypeMethodDescriptionfloat[]
fromCIEXYZ
(float[] colorvalue) float[]
fromRGB
(float[] rgbvalue) int
int
getType()
float[]
toCIEXYZ
(float[] colorvalue) float[]
toRGB
(float[] comp) Methods inherited from class java.awt.color.ColorSpace
getInstance, getMaxValue, getMinValue, getName, isCS_sRGB
-
Constructor Details
-
CalGrayColor
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 classColorSpace
-
toRGB
public float[] toRGB(float[] comp) convert from Calibrated Gray to RGB.
- Specified by:
toRGB
in classColorSpace
-
fromRGB
public float[] fromRGB(float[] rgbvalue) convert from RGB to Calibrated Gray. NOT IMPLEMENTED
- Specified by:
fromRGB
in classColorSpace
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] colorvalue) convert from CIEXYZ to Calibrated Gray. NOT IMPLEMENTED
- Specified by:
fromCIEXYZ
in classColorSpace
-
getType
public int getType()get the type of this ColorSpace (TYPE_GRAY)
- Overrides:
getType
in classColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue) convert from Calibrated Gray to CIEXYZ. NOT IMPLEMENTED
- Specified by:
toCIEXYZ
in classColorSpace
-