Foxit PDF SDK
|
Public Member Functions | |
Color () | |
Construct an empty color. | |
Color (Color other) | |
Constructor, with another color object. More... | |
Color (ColorSpace color_space) throws com.foxit.sdk.PDFException | |
Constructor, with a color space object. More... | |
Color | convertToCMYK (int intent) throws com.foxit.sdk.PDFException |
Convert to a CMYK color. More... | |
Color | convertToRGB (int intent) throws com.foxit.sdk.PDFException |
Convert to a RGB color. More... | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
ColorSpace | getColorSpace () throws com.foxit.sdk.PDFException |
Get the color space that current color belongs to. More... | |
FloatArray | getValue () throws com.foxit.sdk.PDFException |
Get component value array. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
void | setValue (FloatArray component_array) throws com.foxit.sdk.PDFException |
Set component value array. More... | |
This class represents a color.
com.foxit.sdk.common.Color.Color | ( | ColorSpace | color_space | ) | throws com.foxit.sdk.PDFException |
Constructor, with a color space object.
[in] | color_space | A valid color space object. |
com.foxit.sdk.common.Color.Color | ( | Color | other | ) |
Constructor, with another color object.
[in] | other | Another Color object. |
Color com.foxit.sdk.common.Color.convertToCMYK | ( | int | intent | ) | throws com.foxit.sdk.PDFException |
Convert to a CMYK color.
[in] | intent | (Reserved) Rendering intent used for color conversion. |
Color com.foxit.sdk.common.Color.convertToRGB | ( | int | intent | ) | throws com.foxit.sdk.PDFException |
Convert to a RGB color.
[in] | intent | (Reserved) Rendering intent used for color conversion. |
synchronized void com.foxit.sdk.common.Color.delete | ( | ) |
Clean up related resources immediately.
Reimplemented from com.foxit.sdk.common.Base.
ColorSpace com.foxit.sdk.common.Color.getColorSpace | ( | ) | throws com.foxit.sdk.PDFException |
Get the color space that current color belongs to.
FloatArray com.foxit.sdk.common.Color.getValue | ( | ) | throws com.foxit.sdk.PDFException |
Get component value array.
The count of components depends on the color space that current color belongs to. User can get the color space object by function Color.getColorSpace , and then get the count of componets by function ColorSpace.getComponentCount .
boolean com.foxit.sdk.common.Color.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
void com.foxit.sdk.common.Color.setValue | ( | FloatArray | component_array | ) | throws com.foxit.sdk.PDFException |
Set component value array.
The count of components depends on the color space that current color belongs to. User can get the color space object by function Color.getColorSpace , and then get the count of componets by function ColorSpace.getComponentCount .
[in] | component_array | A component value array. The count of components in this array should match the count of components of the color space that current color belongs to. Valid range of each component value: from 0.0 to 1.0. |