Foxit PDF SDK
|
Public Member Functions | |
ColorSpace (int type) | |
Constructor, with specified color type. More... | |
ColorSpace (ColorSpace other) | |
Constructor, with another color space object. More... | |
Color | convertColor (Color color) throws com.foxit.sdk.PDFException |
Convert input color to the color in current color space. More... | |
Color | convertColor (int r_value, int g_value, int b_value) throws com.foxit.sdk.PDFException |
Convert input R/G/B component values to a color in current color space. More... | |
Color | convertColor (int c_value, int m_value, int y_value, int k_value) throws com.foxit.sdk.PDFException |
Convert input C/M/Y/K component values to a color object in current color space. More... | |
int | getColorSpaceType () |
Get color space type. More... | |
int | getComponentCount () |
Get the count of components. More... | |
java.util.ArrayList< java.lang.String > | getComponentNames () throws com.foxit.sdk.PDFException |
Get a string array which represents the name of colorant for Separation color space, or names specifying the individual color components for DeviceN color space. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
boolean | isSpotColorSpace () throws com.foxit.sdk.PDFException |
Check whether current color space object is a spot color space or not. More... | |
Static Public Attributes | |
static final int | e_RenderIntentAbsColorimetric = 3 |
Rendering intent: Absolute Colorimetric. | |
static final int | e_RenderIntentPerceptual = 0 |
Rendering intent: Perceptual. | |
static final int | e_RenderIntentRelColorimetric = 1 |
Rendering intent: Relative Colorimetric. | |
static final int | e_RenderIntentSaturation = 2 |
Rendering intent: Saturation. | |
This class represents color space. User can use this class to covert colors.
com.foxit.sdk.common.ColorSpace.ColorSpace | ( | int | type | ) |
Constructor, with specified color type.
[in] | type | The color space type. Currently, this value can only be one of following values: com.foxit.sdk.common.Constants.e_ColorSpaceDeviceGray , com.foxit.sdk.common.Constants.e_ColorSpaceDeviceRGB , com.foxit.sdk.common.Constants.e_ColorSpaceDeviceCMYK . For other unsupported color space type, exception com.foxit.sdk.common.Constants.e_ErrUnsupported will be thrown. |
com.foxit.sdk.common.ColorSpace.ColorSpace | ( | ColorSpace | other | ) |
Constructor, with another color space object.
[in] | other | Another color space object. |
Color com.foxit.sdk.common.ColorSpace.convertColor | ( | Color | color | ) | throws com.foxit.sdk.PDFException |
Convert input color to the color in current color space.
[in] | color | Input color, which is to be converted to current color space. |
Color com.foxit.sdk.common.ColorSpace.convertColor | ( | int | r_value, |
int | g_value, | ||
int | b_value | ||
) | throws com.foxit.sdk.PDFException |
Convert input R/G/B component values to a color in current color space.
[in] | r_value | R component value. Valid range: from 0 to 255. |
[in] | g_value | G component value. Valid range: from 0 to 255. |
[in] | b_value | B component value. Valid range: from 0 to 255. |
Color com.foxit.sdk.common.ColorSpace.convertColor | ( | int | c_value, |
int | m_value, | ||
int | y_value, | ||
int | k_value | ||
) | throws com.foxit.sdk.PDFException |
Convert input C/M/Y/K component values to a color object in current color space.
[in] | c_value | C component value. Valid range: from 0 to 255. |
[in] | m_value | M component value. Valid range: from 0 to 255. |
[in] | y_value | Y component value. Valid range: from 0 to 255. |
[in] | k_value | K component value. Valid range: from 0 to 255. |
int com.foxit.sdk.common.ColorSpace.getColorSpaceType | ( | ) |
Get color space type.
int com.foxit.sdk.common.ColorSpace.getComponentCount | ( | ) |
Get the count of components.
For different color space type, the count of components are not the same.
java.util.ArrayList< java.lang.String > com.foxit.sdk.common.ColorSpace.getComponentNames | ( | ) | throws com.foxit.sdk.PDFException |
Get a string array which represents the name of colorant for Separation color space, or names specifying the individual color components for DeviceN color space.
This function is only available when current color space type is com.foxit.sdk.common.Constants.e_ColorSpaceSeparation or com.foxit.sdk.common.Constants.e_ColorSpaceDeviceN . For other color space type, this function will return an empty string array.
boolean com.foxit.sdk.common.ColorSpace.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
boolean com.foxit.sdk.common.ColorSpace.isSpotColorSpace | ( | ) | throws com.foxit.sdk.PDFException |
Check whether current color space object is a spot color space or not.