Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive).
More...
#include <Colour.hpp>
|
| | Colour () |
| | Alpha component. More...
|
| |
| | Colour (const unsigned char r, const unsigned char g, const unsigned char b, const unsigned char a) |
| | Constructor initializes colour with passed components. More...
|
| |
| unsigned char | r () const |
| | Return the red component. More...
|
| |
| unsigned char | g () const |
| | Return the green component. More...
|
| |
| unsigned char | b () const |
| | Return the blue component. More...
|
| |
| unsigned char | a () const |
| | Return the alpha component. More...
|
| |
| void | setR (const unsigned char r) |
| | Set the red component of the colour. More...
|
| |
| void | setG (const unsigned char g) |
| | Set the green component of the colour. More...
|
| |
| void | setB (const unsigned char b) |
| | Set the blue component of the colour. More...
|
| |
| void | setA (const unsigned char a) |
| | Set the alpha component of the colour. More...
|
| |
| void | setColour (const unsigned char r, const unsigned char g, const unsigned char b, const unsigned char a) |
| | Set all components. More...
|
| |
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive).
◆ Colour() [1/2]
| Aether::Colour::Colour |
( |
| ) |
|
Alpha component.
Default constructor, initializes to opaque white.
◆ Colour() [2/2]
| Aether::Colour::Colour |
( |
const unsigned char |
r, |
|
|
const unsigned char |
g, |
|
|
const unsigned char |
b, |
|
|
const unsigned char |
a |
|
) |
| |
Constructor initializes colour with passed components.
- Parameters
-
| r | red component |
| g | green component |
| b | blue component |
| a | alpha component |
◆ a()
| unsigned char Aether::Colour::a |
( |
| ) |
const |
Return the alpha component.
- Returns
- Alpha component of colour
◆ b()
| unsigned char Aether::Colour::b |
( |
| ) |
const |
Return the blue component.
- Returns
- Blue component of colour
◆ g()
| unsigned char Aether::Colour::g |
( |
| ) |
const |
Return the green component.
- Returns
- Green component of colour
◆ r()
| unsigned char Aether::Colour::r |
( |
| ) |
const |
Return the red component.
- Returns
- Red component of colour
◆ setA()
| void Aether::Colour::setA |
( |
const unsigned char |
a | ) |
|
Set the alpha component of the colour.
- Parameters
-
| a | Alpha component of colour |
◆ setB()
| void Aether::Colour::setB |
( |
const unsigned char |
b | ) |
|
Set the blue component of the colour.
- Parameters
-
| b | Blue component of colour |
◆ setColour()
| void Aether::Colour::setColour |
( |
const unsigned char |
r, |
|
|
const unsigned char |
g, |
|
|
const unsigned char |
b, |
|
|
const unsigned char |
a |
|
) |
| |
Set all components.
- Parameters
-
| r | Red component |
| g | Green component |
| b | Blue component |
| a | Alpha component |
◆ setG()
| void Aether::Colour::setG |
( |
const unsigned char |
g | ) |
|
Set the green component of the colour.
- Parameters
-
| g | Green component of colour |
◆ setR()
| void Aether::Colour::setR |
( |
const unsigned char |
r | ) |
|
Set the red component of the colour.
- Parameters
-
The documentation for this class was generated from the following file: