|
hgl 0.5.25
A compiler/interpreter suite for developing images (plugin development)
|
Structure representing a color. More...
#include "icanvas.h"
Public Member Functions | |
| RGBA () throw () | |
| Constructor. More... | |
| RGBA (const std::string &hexStr) throw () | |
| Constructor. More... | |
| RGBA (uint8_t r, uint8_t g, uint8_t b, uint8_t a) throw () | |
| Constructor. More... | |
| RGBA (uint32_t index) throw () | |
| Constructor. More... | |
| virtual | ~RGBA () throw () |
| Destructor. More... | |
| uint32_t | getColorIndex () const throw () |
| Gets the color index. More... | |
Public Attributes | |
| uint8_t | alpha |
| the alpha value between 0 and 255 More... | |
| uint8_t | blue |
| the blue value between 0 and 255 More... | |
| uint8_t | green |
| the green value between 0 and 255 More... | |
| uint8_t | red |
| the red value between 0 and 255 More... | |
Structure representing a color.
Includes the alpha channel
| HGL::ImageOutput::ICanvas::RGBA::RGBA | ( | ) | ||
| throw | ( | |||
| ) | ||||
Constructor.
Initial is color white with no opacity (rsep. full transparent)
|
explicit | ||||||||||||||
Constructor.
| hexStr | a string in the form rrggbbaa |
| HGL::ImageOutput::ICanvas::RGBA::RGBA | ( | uint8_t | r, |
| uint8_t | g, | ||
| uint8_t | b, | ||
| uint8_t | a | ||
| ) | |||
| throw | ( | ||
| ) | |||
Constructor.
| r | the red value between 0 and 255 |
| g | the green value between 0 and 255 |
| b | the blue value between 0 and 255 |
| a | the alpha value between 0 and 255 |
| HGL::ImageOutput::ICanvas::RGBA::RGBA | ( | uint32_t | index | ) | |
| throw | ( | ||||
| ) | |||||
Constructor.
Constructs an RGBA instance from a 32 bit integer.
The integer should have a hex form like 0xrrggbbaa.
| index | the color index |
|
virtual | |||||||||||||
Destructor.
| uint32_t HGL::ImageOutput::ICanvas::RGBA::getColorIndex | ( | ) | const | |
| throw | ( | |||
| ) | ||||
Gets the color index.
| uint8_t HGL::ImageOutput::ICanvas::RGBA::alpha |
the alpha value between 0 and 255
| uint8_t HGL::ImageOutput::ICanvas::RGBA::blue |
the blue value between 0 and 255
| uint8_t HGL::ImageOutput::ICanvas::RGBA::green |
the green value between 0 and 255
| uint8_t HGL::ImageOutput::ICanvas::RGBA::red |
the red value between 0 and 255
1.8.5