#include <PdfColor.h>
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 |
EPdfColorSpace | GetColorSpace () 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 |
PdfColor | ConvertToGrayScale () const |
PdfColor | ConvertToRGB () const |
PdfColor | ConvertToCMYK () const |
PdfArray | ToArray () const |
Static Public Member Functions | |
static PdfColor | FromString (const char *pszName) |
static PdfColor | FromArray (const PdfArray &rArray) |
All drawing functions in PoDoFo accept a PdfColor object to specify a drawing color in one of these colorspaces.
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 |
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. |
double PoDoFo::PdfColor::GetBlack | ( | ) | const [inline] |
Get the black color value of this object.
Throws an exception if this is no CMYK 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.
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 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 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 color object.
bool PoDoFo::PdfColor::IsCMYK | ( | ) | const [inline] |
bool PoDoFo::PdfColor::IsGrayScale | ( | ) | const [inline] |
bool PoDoFo::PdfColor::IsRGB | ( | ) | const [inline] |
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.