Package com.sun.pdfview.colorspace
Class CMYKColorSpace
- java.lang.Object
-
- java.awt.color.ColorSpace
-
- com.sun.pdfview.colorspace.CMYKColorSpace
-
- All Implemented Interfaces:
java.io.Serializable
public class CMYKColorSpace extends java.awt.color.ColorSpace
A ColorSpace for the CMYK color space.- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description CMYKColorSpace()
create a new CMYK color space: a ColorSpace with 4 components
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]
fromCIEXYZ(float[] colorvalue)
Convert from CIEXYZ to RGB.float[]
fromRGB(float[] rgbvalue)
Convert from RGB to CMYK.java.lang.String
getName(int idx)
the name of this color spaceint
getNumComponents()
the number of componentsint
getType()
the type of this color space (TYPE_CMYK)float[]
toCIEXYZ(float[] colorvalue)
Convert from CMYK to CIEXYZ.float[]
toRGB(float[] colorvalue)
Convert from CMYK to RGB.
-
-
-
Method Detail
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] colorvalue)
Convert from CIEXYZ to RGB. NOT IMPLEMENTED- Specified by:
fromCIEXYZ
in classjava.awt.color.ColorSpace
-
fromRGB
public float[] fromRGB(float[] rgbvalue)
Convert from RGB to CMYK.- Specified by:
fromRGB
in classjava.awt.color.ColorSpace
- Parameters:
rgbvalue
- the red, green, and blue values (0-1)- Returns:
- the CMYK values (0-1)
-
getNumComponents
public int getNumComponents()
the number of components- Overrides:
getNumComponents
in classjava.awt.color.ColorSpace
-
getName
public java.lang.String getName(int idx)
the name of this color space- Overrides:
getName
in classjava.awt.color.ColorSpace
-
getType
public int getType()
the type of this color space (TYPE_CMYK)- Overrides:
getType
in classjava.awt.color.ColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue)
Convert from CMYK to CIEXYZ. NOT IMPLEMENTED- Specified by:
toCIEXYZ
in classjava.awt.color.ColorSpace
-
toRGB
public float[] toRGB(float[] colorvalue)
Convert from CMYK to RGB.- Specified by:
toRGB
in classjava.awt.color.ColorSpace
- Parameters:
colorvalue
- the CMYK values (0-1)- Returns:
- the RGB values (0-1)
-
-