#include <CSSUnit.hpp>
Public Member Functions | |
| Colour (const char *const input, const int length) | |
| Construct a color from an HEX triplet. | |
| Colour (const uint8 _R=0, const uint8 _G=0, const uint8 _B=0, const uint8 _A=0) | |
| The default constructor. | |
| bool | fromString (const char *const input, const int length) |
| Change the color from the string if the string matches the WWW HTML4.01 color standard. | |
| const bool | operator!= (const Colour &colour) const |
| Equivalence operators. | |
| const bool | operator== (const Colour &colour) const |
| Equivalence operators. | |
| void | toString (char *output, int &length) |
| Export this color as string like WWW HTML4.01 color standard. | |
Public Attributes | |
| uint8 | A |
| uint8 | B |
| uint8 | G |
| uint8 | R |
| The colour components (here as RGB + alpha). | |
| CSS::Colour::Colour | ( | const uint8 | _R = 0, |
|
| const uint8 | _G = 0, |
|||
| const uint8 | _B = 0, |
|||
| const uint8 | _A = 0 | |||
| ) | [inline] |
The default constructor.
| CSS::Colour::Colour | ( | const char *const | input, | |
| const int | length | |||
| ) | [inline] |
Construct a color from an HEX triplet.
| bool CSS::Colour::fromString | ( | const char *const | input, | |
| const int | length | |||
| ) | [inline] |
Change the color from the string if the string matches the WWW HTML4.01 color standard.
| const bool CSS::Colour::operator!= | ( | const Colour & | colour | ) | const [inline] |
Equivalence operators.
| const bool CSS::Colour::operator== | ( | const Colour & | colour | ) | const [inline] |
Equivalence operators.
| void CSS::Colour::toString | ( | char * | output, | |
| int & | length | |||
| ) | [inline] |
Export this color as string like WWW HTML4.01 color standard.
| output | if set to 0, then the method put the required length in length | |
| length | if the allocated area is smaller than required, the length param is adjusted to the minimum size |
| uint8 CSS::Colour::A |
| uint8 CSS::Colour::B |
| uint8 CSS::Colour::G |
| uint8 CSS::Colour::R |
The colour components (here as RGB + alpha).
