pdfmm 0.9.20
Public Member Functions | List of all members
PdfNamedColor Class Reference

Public Member Functions

 PdfNamedColor (const char *name, const PdfColor &color)
 
 PdfNamedColor (const char *name, const char *colorName)
 
 PdfNamedColor (const PdfNamedColor &rhs)
 
 ~PdfNamedColor ()
 
bool operator< (const char *name) const
 
bool operator< (const PdfNamedColor &rhs) const
 
bool operator== (const char *name) const
 
const PdfColorGetColor () const
 
const char * GetName () const
 

Detailed Description

A PdfNamedColor holds a PdfColor object and a name.

Constructor & Destructor Documentation

◆ PdfNamedColor() [1/3]

PdfNamedColor::PdfNamedColor ( const char *  name,
const PdfColor color 
)
inline

Create a PdfNamedColor object.

Parameters
namethe name. The string must be allocated as static memory somewhere The string data will not be copied!
colora PdfColor object

◆ PdfNamedColor() [2/3]

PdfNamedColor::PdfNamedColor ( const char *  name,
const char *  colorName 
)
inline

Create a PdfNamedColor object.

Parameters
namethe name. The string must be allocated as static memory somewhere The string data will not be copied!
rColorNameRGB hex value (e.g. #FFABCD)

◆ PdfNamedColor() [3/3]

PdfNamedColor::PdfNamedColor ( const PdfNamedColor rhs)
inline

Copy constructor

◆ ~PdfNamedColor()

PdfNamedColor::~PdfNamedColor ( )
inline

Class destructor.

Member Function Documentation

◆ GetColor()

const PdfColor & PdfNamedColor::GetColor ( ) const
inline
Returns
a reference to the internal color object

◆ GetName()

const char * PdfNamedColor::GetName ( ) const
inline
Returns
a pointer to the name of the color

◆ operator<() [1/2]

bool PdfNamedColor::operator< ( const char *  name) const
inline

Compare this color object to a name The comparison is case insensitive!

Returns
true if the passed string is smaller than the name of this color object.

◆ operator<() [2/2]

bool PdfNamedColor::operator< ( const PdfNamedColor rhs) const
inline

Compare this color object to a PdfNamedColor comparing only the name. The comparison is case insensitive!

Returns
true if the passed string is smaller than the name of this color object.

◆ operator==()

bool PdfNamedColor::operator== ( const char *  name) const
inline

Compare this color object to a name The comparison is case insensitive!

Returns
true if the passed string is the name of this color object.