Foxit PDF SDK
|
Public Member Functions | |
Color () | |
Construct an empty color. | |
Color (const ColorSpace &color_space) | |
Constructor, with a color space object. More... | |
Color (const Color &other) | |
Constructor, with another color object. More... | |
~Color () | |
Destructor. | |
Color | ConvertToCMYK (ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const |
Convert to a CMYK color. More... | |
Color | ConvertToRGB (ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const |
Convert to a RGB color. More... | |
ColorSpace | GetColorSpace () |
Get the color space that current color belongs to. More... | |
FloatArray | GetValue () const |
Get component value array. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | operator!= (const Color &other) const |
Not equal operator. More... | |
Color & | operator= (const Color &other) |
Assign operator. More... | |
bool | operator== (const Color &other) const |
Equal operator. More... | |
void | SetValue (const FloatArray &component_array) |
Set component value array. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
This class represents a color.
|
explicit |
Constructor, with a color space object.
[in] | color_space | A valid color space object. |
foxit::common::Color::Color | ( | const Color & | other | ) |
Constructor, with another color object.
[in] | other | Another Color object. |
Color foxit::common::Color::ConvertToCMYK | ( | ColorSpace::RenderingIntent | intent = ColorSpace::e_RenderIntentRelColorimetric | ) | const |
Convert to a CMYK color.
[in] | intent | (Reserved) Rendering intent used for color conversion. |
Color foxit::common::Color::ConvertToRGB | ( | ColorSpace::RenderingIntent | intent = ColorSpace::e_RenderIntentRelColorimetric | ) | const |
Convert to a RGB color.
[in] | intent | (Reserved) Rendering intent used for color conversion. |
ColorSpace foxit::common::Color::GetColorSpace | ( | ) |
Get the color space that current color belongs to.
FloatArray foxit::common::Color::GetValue | ( | ) | const |
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.
bool foxit::common::Color::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::Color::operator!= | ( | const Color & | other | ) | const |
Not equal operator.
[in] | other | Another color object. This function will check if current object is not equal to this one. |
Assign operator.
[in] | other | Another color object, whose value would be assigned to current object. |
bool foxit::common::Color::operator== | ( | const Color & | other | ) | const |
Equal operator.
[in] | other | Another color object. This function will check if current object is equal to this one. |
void foxit::common::Color::SetValue | ( | const FloatArray & | component_array | ) |
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. |