A PdfNamedColor holds a PdfColor object and a name.
◆ PdfNamedColor() [1/3]
PdfNamedColor::PdfNamedColor |
( |
const string_view & |
name, |
|
|
const PdfColor & |
color |
|
) |
| |
|
inline |
Create a PdfNamedColor object.
- Parameters
-
name | the name. The string must be allocated as static memory somewhere The string data will not be copied! |
color | a PdfColor object |
◆ PdfNamedColor() [2/3]
PdfNamedColor::PdfNamedColor |
( |
const string_view & |
name, |
|
|
const string_view & |
colorCode |
|
) |
| |
|
inline |
Create a PdfNamedColor object.
- Parameters
-
name | the name. The string must be allocated as static memory somewhere The string data will not be copied! |
colorName | RGB hex value (e.g. #FFABCD) |
◆ PdfNamedColor() [3/3]
◆ GetColor()
const PdfColor & PdfNamedColor::GetColor |
( |
| ) |
const |
|
inline |
- Returns
- a reference to the internal color object
◆ GetName()
const string & PdfNamedColor::GetName |
( |
| ) |
const |
|
inline |
- Returns
- a pointer to the name of the color
◆ operator<() [1/2]
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<() [2/2]
bool PdfNamedColor::operator< |
( |
const string_view & |
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==()
bool PdfNamedColor::operator== |
( |
const string_view & |
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.