#include <PdfColor.h>
Inherited by PoDoFo::PdfColorCieLab, PoDoFo::PdfColorCMYK, PoDoFo::PdfColorGray, PoDoFo::PdfColorRGB, PoDoFo::PdfColorSeparation, PoDoFo::PdfColorSeparationAll, and PoDoFo::PdfColorSeparationNone.
Public Member Functions | |
| PdfColor () | |
| PdfColor (double dGray) | |
| PdfColor (double dRed, double dGreen, double dBlue) | |
| PdfColor (double dCyan, double dMagenta, double dYellow, double dBlack) | |
| PdfColor (const PdfColor &rhs) | |
| const PdfColor & | operator= (const PdfColor &rhs) |
| bool | operator== (const PdfColor &rhs) const |
| bool | operator!= (const PdfColor &rhs) const |
| bool | IsGrayScale () const |
| bool | IsRGB () const |
| bool | IsCMYK () const |
| bool | IsSeparation () const |
| bool | IsCieLab () const |
| EPdfColorSpace | GetColorSpace () const |
| EPdfColorSpace | GetAlternateColorSpace () const |
| double | GetGrayScale () const |
| double | GetRed () const |
| double | GetGreen () const |
| double | GetBlue () const |
| double | GetCyan () const |
| double | GetMagenta () const |
| double | GetYellow () const |
| double | GetBlack () const |
| const std::string | GetName () const |
| double | GetDensity () const |
| double | GetCieL () const |
| double | GetCieA () const |
| double | GetCieB () const |
| PdfColor | ConvertToGrayScale () const |
| PdfColor | ConvertToRGB () const |
| PdfColor | ConvertToCMYK () const |
| PdfArray | ToArray () const |
| PdfObject * | BuildColorSpace (PdfVecObjects *pOwner) const |
Static Public Member Functions | |
| static PdfColor | FromString (const char *pszName) |
| static PdfColor | FromArray (const PdfArray &rArray) |
A color object can represent either a grayscale value, a RGB color, a CMYK color, a separation color or a CieLab color.
All drawing functions in PoDoFo accept a PdfColor object to specify a drawing color in one of these colorspaces.
Derived classes PdfColorGray, PdfColorRGB, PdfColorCMYK, PdfColorSeparation and PdfColorCieLab are available for easy construction
| PoDoFo::PdfColor::PdfColor | ( | ) |
Create a PdfColor object that is RGB black.
| PoDoFo::PdfColor::PdfColor | ( | double | dGray | ) |
Create a new PdfColor object with a grayscale value.
| dGray | a grayscalue value between 0.0 and 1.0 |
| PoDoFo::PdfColor::PdfColor | ( | double | dRed, | |
| double | dGreen, | |||
| double | dBlue | |||
| ) |
Create a new PdfColor object with a RGB color
| dRed | the value of the red component, must be between 0.0 and 1.0 | |
| dGreen | the value of the green component, must be between 0.0 and 1.0 | |
| dBlue | the value of the blue component, must be between 0.0 and 1.0 |
| PoDoFo::PdfColor::PdfColor | ( | double | dCyan, | |
| double | dMagenta, | |||
| double | dYellow, | |||
| double | dBlack | |||
| ) |
Create a new PdfColor object with a CMYK color
| dCyan | the value of the cyan component, must be between 0.0 and 1.0 | |
| dMagenta | the value of the magenta component, must be between 0.0 and 1.0 | |
| dYellow | the value of the yellow component, must be between 0.0 and 1.0 | |
| dBlack | the value of the black component, must be between 0.0 and 1.0 |
| PoDoFo::PdfColor::PdfColor | ( | const PdfColor & | rhs | ) | [inline] |
Copy constructor
| rhs | copy rhs into this object |
| PdfObject * PoDoFo::PdfColor::BuildColorSpace | ( | PdfVecObjects * | pOwner | ) | const |
Creates a colorspace object from a color to insert into resources.
| pOwner | a pointer to the owner of the generated object |
| PdfColor PoDoFo::PdfColor::ConvertToCMYK | ( | ) | const |
Converts the color object into a CMYK color object.
This is only a convinience function. It might be useful for on screen display but is in NO WAY suitable to professional printing!
| PdfColor PoDoFo::PdfColor::ConvertToGrayScale | ( | ) | const |
Converts the color object into a grayscale color object.
This is only a convinience function. It might be useful for on screen display but is in NO WAY suitable to professional printing!
| PdfColor PoDoFo::PdfColor::ConvertToRGB | ( | ) | const |
Converts the color object into a RGB color object.
This is only a convinience function. It might be useful for on screen display but is in NO WAY suitable to professional printing!
| PdfColor PoDoFo::PdfColor::FromArray | ( | const PdfArray & | rArray | ) | [static] |
Creates a color object from a PdfArray which represents a color.
Raises an exception if this is no PdfColor!
| rArray | an array that must be a color PdfArray |
| PdfColor PoDoFo::PdfColor::FromString | ( | const char * | pszName | ) | [static] |
Creates a color object from a string.
| pszName | a string describing a color. |
Supported values are:
| EPdfColorSpace PoDoFo::PdfColor::GetAlternateColorSpace | ( | ) | const [inline] |
| double PoDoFo::PdfColor::GetBlack | ( | ) | const [inline] |
Get the black color value of this object.
Throws an exception if this is no CMYK or separation color object.
| double PoDoFo::PdfColor::GetBlue | ( | ) | const [inline] |
Get the blue color value of this object.
Throws an exception if this is no RGB color object.
| double PoDoFo::PdfColor::GetCieA | ( | ) | const [inline] |
Get the A color value of this object.
Throws an exception if this is no CIE-Lab color object.
| double PoDoFo::PdfColor::GetCieB | ( | ) | const [inline] |
Get the B color value of this object.
Throws an exception if this is no CIE-Lab color object.
| double PoDoFo::PdfColor::GetCieL | ( | ) | const [inline] |
Get the L color value of this object.
Throws an exception if this is no CIE-Lab color object.
| EPdfColorSpace PoDoFo::PdfColor::GetColorSpace | ( | ) | const [inline] |
| double PoDoFo::PdfColor::GetCyan | ( | ) | const [inline] |
Get the cyan color value of this object.
Throws an exception if this is no CMYK or separation color object.
| double PoDoFo::PdfColor::GetDensity | ( | ) | const [inline] |
Get the density color value of this object.
Throws an exception if this is no separation color object.
| double PoDoFo::PdfColor::GetGrayScale | ( | ) | const [inline] |
Get the grayscale color value of this object.
Throws an exception if this is no grayscale color object.
| double PoDoFo::PdfColor::GetGreen | ( | ) | const [inline] |
Get the green color value of this object.
Throws an exception if this is no RGB color object.
| double PoDoFo::PdfColor::GetMagenta | ( | ) | const [inline] |
Get the magenta color value of this object.
Throws an exception if this is no CMYK or separation color object.
| const std::string PoDoFo::PdfColor::GetName | ( | ) | const [inline] |
Get the separation name of this object.
Throws an exception if this is no separation color object.
| double PoDoFo::PdfColor::GetRed | ( | ) | const [inline] |
Get the red color value of this object.
Throws an exception if this is no RGB color object.
| double PoDoFo::PdfColor::GetYellow | ( | ) | const [inline] |
Get the yellow color value of this object.
Throws an exception if this is no CMYK or separation color object.
| bool PoDoFo::PdfColor::IsCieLab | ( | ) | const [inline] |
Test if this is a CIE-Lab color.
| bool PoDoFo::PdfColor::IsCMYK | ( | ) | const [inline] |
Test if this is a CMYK color.
| bool PoDoFo::PdfColor::IsGrayScale | ( | ) | const [inline] |
Test if this is a grayscale color.
| bool PoDoFo::PdfColor::IsRGB | ( | ) | const [inline] |
Test if this is a RGB color.
| bool PoDoFo::PdfColor::IsSeparation | ( | ) | const [inline] |
Test if this is a separation color.
| bool PoDoFo::PdfColor::operator!= | ( | const PdfColor & | rhs | ) | const [inline] |
Test for inequality of colors.
| rhs | color to compare ro |
Assignment operator
| rhs | copy rhs into this object |
| bool PoDoFo::PdfColor::operator== | ( | const PdfColor & | rhs | ) | const [inline] |
Test for equality of colors.
| rhs | color to compare ro |
| PdfArray PoDoFo::PdfColor::ToArray | ( | ) | const |
Creates a PdfArray which represents a color from a color.
1.6.1