|
bpp-core
2.1.0
|
Describe a color according to its red, green and blue componants. More...
#include <Bpp/Graphics/RgbColor.h>
Inheritance diagram for bpp::RGBColor:
Collaboration diagram for bpp::RGBColor: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. | |
| bool | operator== (const RGBColor &color) const |
| bool | operator< (const RGBColor &color) const |
| Comparison operator (for sorting purposes). | |
| std::string | toHex () const |
| Get the HTML-like, hexadecimal description of this color. | |
| const unsigned int & | operator[] (unsigned int i) const |
| Access to each color componant: 0=red, 1=green, 2=blue. | |
| unsigned int & | operator[] (unsigned int i) |
| Access to each color componant: 0=red, 1=green, 2=blue. | |
| std::string | toString () const |
| Get a string description of the color, e.g. [R255,G0,B255]. | |
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 56 of file RgbColor.h.
| bpp::RGBColor::RGBColor | ( | unsigned int | red, |
| unsigned int | green, | ||
| unsigned int | blue | ||
| ) | [inline] |
Definition at line 65 of file RgbColor.h.
| bpp::RGBColor::RGBColor | ( | ) | [inline] |
Definition at line 66 of file RgbColor.h.
Referenced by clone().
| virtual bpp::RGBColor::~RGBColor | ( | ) | [inline, virtual] |
Definition at line 67 of file RgbColor.h.
| RGBColor* bpp::RGBColor::clone | ( | ) | const [inline, virtual] |
Create a copy of this object and send a pointer to it.
Implements bpp::Clonable.
Definition at line 74 of file RgbColor.h.
References RGBColor().
| static std::string bpp::RGBColor::decToHex | ( | unsigned int | dec | ) | [inline, static, protected] |
Definition at line 137 of file RgbColor.h.
Referenced by toHex().
| bool bpp::RGBColor::operator< | ( | const RGBColor & | color | ) | const [inline] |
Comparison operator (for sorting purposes).
The hexadecimal string representation is used for comparison.
| color | The color to compare with. |
Definition at line 89 of file RgbColor.h.
References toHex().
| bool bpp::RGBColor::operator== | ( | const RGBColor & | color | ) | const [inline] |
Definition at line 77 of file RgbColor.h.
| const unsigned int& bpp::RGBColor::operator[] | ( | unsigned int | i | ) | const [inline] |
Access to each color componant: 0=red, 1=green, 2=blue.
Definition at line 109 of file RgbColor.h.
| unsigned int& bpp::RGBColor::operator[] | ( | unsigned int | i | ) | [inline] |
Access to each color componant: 0=red, 1=green, 2=blue.
Definition at line 120 of file RgbColor.h.
| std::string bpp::RGBColor::toHex | ( | ) | const [inline] |
Get the HTML-like, hexadecimal description of this color.
Definition at line 97 of file RgbColor.h.
References blue_, decToHex(), green_, and red_.
Referenced by operator<().
| std::string bpp::RGBColor::toString | ( | ) | const [inline] |
Get a string description of the color, e.g. [R255,G0,B255].
Definition at line 131 of file RgbColor.h.
unsigned int bpp::RGBColor::blue_ [protected] |
Definition at line 62 of file RgbColor.h.
Referenced by operator==(), operator[](), toHex(), and toString().
unsigned int bpp::RGBColor::green_ [protected] |
Definition at line 61 of file RgbColor.h.
Referenced by operator==(), operator[](), toHex(), and toString().
unsigned int bpp::RGBColor::red_ [protected] |
Definition at line 60 of file RgbColor.h.
Referenced by operator==(), operator[](), toHex(), and toString().