Structure representing a color. More...
#include <icanvas.h>
Public Member Functions | |
| RGB (const std::string &hexStr) throw () | |
| RGB (uint32_t index) throw () | |
| Constructor. | |
| RGB (uint8_t r, uint8_t g, uint8_t b) throw () | |
| Constructor. | |
| virtual | ~RGB () throw () |
| Destructor. | |
| uint32_t | getColorIndex () const throw () |
| Gets the color index. | |
Public Attributes | |
| uint8_t | alpha |
| the alpha value between 0 and 255 | |
| uint8_t | blue |
| the blue value between 0 and 255 | |
| uint8_t | green |
| the green value between 0 and 255 | |
| uint8_t | red |
| the red value between 0 and 255 | |
Structure representing a color.
Alpha channel disabled, i.e. set to 0xFF
| HGL::ImageOutput::ICanvas::RGB::RGB | ( | uint8_t | r, | |
| uint8_t | g, | |||
| uint8_t | b | |||
| ) | throw () |
Constructor.
Initial is color white with full opacity
| r | the red value between 0 and 255 | |
| g | the green value between 0 and 255 | |
| b | the blue value between 0 and 255 |
| HGL::ImageOutput::ICanvas::RGB::RGB | ( | uint32_t | index | ) | throw () |
Constructor.
Constructs an RGB instance from a 32 bit integer.
The integer should have a hex form like 0xrrggbb.
| index | the color index |
| HGL::ImageOutput::ICanvas::RGB::RGB | ( | const std::string & | hexStr | ) | throw () [explicit] |
Constructor.
| hexStr | a string in the form rrggbbaa |
| virtual HGL::ImageOutput::ICanvas::RGB::~RGB | ( | ) | throw () [virtual] |
Destructor.
| uint32_t HGL::ImageOutput::ICanvas::RGBA::getColorIndex | ( | ) | const throw () [inherited] |
Gets the color index.
uint8_t HGL::ImageOutput::ICanvas::RGBA::alpha [inherited] |
the alpha value between 0 and 255
uint8_t HGL::ImageOutput::ICanvas::RGBA::blue [inherited] |
the blue value between 0 and 255
uint8_t HGL::ImageOutput::ICanvas::RGBA::green [inherited] |
the green value between 0 and 255
uint8_t HGL::ImageOutput::ICanvas::RGBA::red [inherited] |
the red value between 0 and 255
1.6.1