bpp-core3
3.0.0
|
Describe a color according to its red, green and blue componants. More...
#include <Bpp/Graphics/RgbColor.h>
Public Member Functions | |
RGBColor (unsigned int red, unsigned int green, unsigned int blue) | |
RGBColor () | |
virtual | ~RGBColor () |
RGBColor * | clone () const |
Create a copy of this object and send a pointer to it. More... | |
bool | operator== (const RGBColor &color) const |
bool | operator< (const RGBColor &color) const |
Comparison operator (for sorting purposes). More... | |
std::string | toHex () const |
Get the HTML-like, hexadecimal description of this color. More... | |
const unsigned int & | operator[] (unsigned int i) const |
Access to each color componant: 0=red, 1=green, 2=blue. More... | |
unsigned int & | operator[] (unsigned int i) |
Access to each color componant: 0=red, 1=green, 2=blue. More... | |
std::string | toString () const |
Get a string description of the color, e.g. [R255,G0,B255]. More... | |
Static Protected Member Functions | |
static std::string | decToHex (unsigned int dec) |
Protected Attributes | |
unsigned int | red_ |
unsigned int | green_ |
unsigned int | blue_ |
Describe a color according to its red, green and blue componants.
Definition at line 21 of file RgbColor.h.
|
inline |
Definition at line 30 of file RgbColor.h.
|
inline |
Definition at line 31 of file RgbColor.h.
Referenced by clone().
|
inlinevirtual |
Definition at line 32 of file RgbColor.h.
|
inlinevirtual |
Create a copy of this object and send a pointer to it.
Implements bpp::Clonable.
Definition at line 34 of file RgbColor.h.
References RGBColor().
|
inlinestaticprotected |
Definition at line 97 of file RgbColor.h.
Referenced by toHex().
|
inline |
Comparison operator (for sorting purposes).
The hexadecimal string representation is used for comparison.
color | The color to compare with. |
Definition at line 49 of file RgbColor.h.
References toHex().
|
inline |
Definition at line 37 of file RgbColor.h.
|
inline |
Access to each color componant: 0=red, 1=green, 2=blue.
Definition at line 69 of file RgbColor.h.
|
inline |
Access to each color componant: 0=red, 1=green, 2=blue.
Definition at line 80 of file RgbColor.h.
|
inline |
Get the HTML-like, hexadecimal description of this color.
Definition at line 57 of file RgbColor.h.
References decToHex().
Referenced by operator<().
|
inline |
Get a string description of the color, e.g. [R255,G0,B255].
Definition at line 91 of file RgbColor.h.
References bpp::TextTools::toString().
|
protected |
Definition at line 27 of file RgbColor.h.
Referenced by operator==(), and operator[]().
|
protected |
Definition at line 26 of file RgbColor.h.
Referenced by operator==(), and operator[]().
|
protected |
Definition at line 25 of file RgbColor.h.
Referenced by operator==(), and operator[]().