Foxit PDF SDK
|
Public Types | |
enum | RenderingIntent { e_RenderIntentPerceptual = 0, e_RenderIntentRelColorimetric = 1, e_RenderIntentSaturation = 2, e_RenderIntentAbsColorimetric = 3 } |
Enumeration for rendering intent. More... | |
Public Member Functions | |
ColorSpace (foxit::common::ColorSpaceType type) | |
Constructor, with specified color type. More... | |
ColorSpace (const ColorSpace &other) | |
Constructor, with another color space object. More... | |
~ColorSpace () | |
Destructor. | |
Color | ConvertColor (const Color &color) |
Convert input color to the color in current color space. More... | |
Color | ConvertColor (int r_value, int g_value, int b_value) |
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) |
Convert input C/M/Y/K component values to a color object in current color space. More... | |
foxit::common::ColorSpaceType | GetColorSpaceType () const |
Get color space type. More... | |
int | GetComponentCount () const |
Get the count of components. More... | |
StringArray | GetComponentNames () const |
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... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | IsSpotColorSpace () const |
Check whether current color space object is a spot color space or not. More... | |
bool | operator!= (const ColorSpace &other) const |
Not equal operator. More... | |
ColorSpace & | operator= (const ColorSpace &other) |
Assign operator. More... | |
bool | operator== (const ColorSpace &other) const |
Equal operator. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
This class represents color space. User can use this class to covert colors.
Enumeration for rendering intent.
Values of this enumeration should be used alone.
Rendering intent can be used for color conversion. Please refer to Section 8.6.5.8 "Rendering intents" in the reference doucment for PDF 2.0 for more details.
foxit::common::ColorSpace::ColorSpace | ( | foxit::common::ColorSpaceType | type | ) |
Constructor, with specified color type.
[in] | type | The color space type. Currently, this value can only be one of following values: common::e_ColorSpaceDeviceGray, common::e_ColorSpaceDeviceRGB, common::e_ColorSpaceDeviceCMYK. For other unsupported color space type, exception foxit::e_ErrUnsupported will be thrown. |
foxit::common::ColorSpace::ColorSpace | ( | const ColorSpace & | other | ) |
Constructor, with another color space object.
[in] | other | Another color space object. |
Convert input color to the color in current color space.
[in] | color | Input color, which is to be converted to current color space. |
Color foxit::common::ColorSpace::ConvertColor | ( | int | r_value, |
int | g_value, | ||
int | b_value | ||
) |
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 foxit::common::ColorSpace::ConvertColor | ( | int | c_value, |
int | m_value, | ||
int | y_value, | ||
int | k_value | ||
) |
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. |
foxit::common::ColorSpaceType foxit::common::ColorSpace::GetColorSpaceType | ( | ) | const |
Get color space type.
int foxit::common::ColorSpace::GetComponentCount | ( | ) | const |
Get the count of components.
For different colorspace type, the count of components are not the same.
StringArray foxit::common::ColorSpace::GetComponentNames | ( | ) | const |
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 common::e_ColorSpaceSeparation or common::e_ColorSpaceDeviceN. For other color space type, this function will return an empty string array.
bool foxit::common::ColorSpace::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::common::ColorSpace::IsSpotColorSpace | ( | ) | const |
Check whether current color space object is a spot color space or not.
bool foxit::common::ColorSpace::operator!= | ( | const ColorSpace & | other | ) | const |
Not equal operator.
[in] | other | Another color space object. This function will check if current object is not equal to this one. |
ColorSpace& foxit::common::ColorSpace::operator= | ( | const ColorSpace & | other | ) |
Assign operator.
[in] | other | Another color space object, whose value would be assigned to current object. |
bool foxit::common::ColorSpace::operator== | ( | const ColorSpace & | other | ) | const |
Equal operator.
[in] | other | Another color space object. This function will check if current object is equal to this one. |