|
Foxit PDF SDK
|
Public 成员函数 | |
| Color () | |
| 构造一个空的颜色对象。 | |
| Color (const ColorSpace &color_space) | |
| 构造函数,使用颜色空间对象 更多... | |
| Color (const Color &other) | |
| 使用另一个color对象的构造函数。 更多... | |
| ~Color () | |
| 析构函数。 | |
| Color | ConvertToCMYK (ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const |
| 转换为CMYK颜色。 更多... | |
| Color | ConvertToRGB (ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const |
| 转换为RGB颜色。 更多... | |
| ColorSpace | GetColorSpace () |
| 获取当前颜色所属的颜色空间。 更多... | |
| FloatArray | GetValue () const |
| 获取分量值数组。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| bool | operator!= (const Color &other) const |
| 不相等操作符。 更多... | |
| Color & | operator= (const Color &other) |
| 赋值操作符。 更多... | |
| bool | operator== (const Color &other) const |
| 相等操作符。 更多... | |
| void | SetValue (const FloatArray &component_array) |
| 设置分量值数组。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
此类表示颜色。
|
explicit |
构造函数,使用颜色空间对象
| [in] | color_space | 有效的颜色空间对象。 |
| Color foxit::common::Color::ConvertToCMYK | ( | ColorSpace::RenderingIntent | intent = ColorSpace::e_RenderIntentRelColorimetric | ) | const |
| Color foxit::common::Color::ConvertToRGB | ( | ColorSpace::RenderingIntent | intent = ColorSpace::e_RenderIntentRelColorimetric | ) | const |
| ColorSpace foxit::common::Color::GetColorSpace | ( | ) |
获取当前颜色所属的颜色空间。
| FloatArray foxit::common::Color::GetValue | ( | ) | const |
获取分量值数组。
分量的数量取决于当前颜色所属的颜色空间。 用户可以通过函数 Color::GetColorSpace 获取颜色空间对象,然后 通过函数 ColorSpace::GetComponentCount 获取分量数量。
| bool foxit::common::Color::IsEmpty | ( | ) | const |
检查当前对象是否为空。
当前对象为空时,表示当前对象无效。
| bool foxit::common::Color::operator!= | ( | const Color & | other | ) | const |
不相等操作符。
| [in] | other | 另一个颜色对象。此函数将检查当前对象是否与该对象不相等。 |
赋值操作符。
| [in] | other | 另一个颜色对象,其值将被赋给当前对象。 |
| bool foxit::common::Color::operator== | ( | const Color & | other | ) | const |
相等操作符。
| [in] | other | 另一个颜色对象。此函数将检查当前对象是否与该对象相等。 |
| void foxit::common::Color::SetValue | ( | const FloatArray & | component_array | ) |
设置分量值数组。
分量的数量取决于当前颜色所属的颜色空间。 用户可以通过函数 Color::GetColorSpace 获取颜色空间对象,然后 通过函数 ColorSpace::GetComponentCount 获取分量数量。
| [in] | component_array | 分量值数组。此数组中的分量数量应与当前颜色所属颜色空间的分量数量匹配。 每个分量值的有效范围为 0.0 到 1.0。 |