This class is used to represent a color in the RGBA format.
More...
#include <color.h>
|
| Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Construct a new Color object using RGBA values.
|
|
| Color (unsigned char r, unsigned char g, unsigned char b) |
| Construct a new Color object using RGB values.
|
|
| Color () |
| Construct a new Color object.
|
|
| Color (ColorPreset preset) |
| Construct a new Color object using a preset.
|
|
void | setR (unsigned char r) |
| Set the Red value of the color.
|
|
void | setG (unsigned char g) |
| Set the Green value of the color.
|
|
void | setB (unsigned char b) |
| Set the Blue value of the color.
|
|
void | setA (unsigned char a) |
| Set the Alpha value of the color.
|
|
void | setColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Set the color of the object using RGBA values.
|
|
void | setColor (ColorPreset preset) |
| Set the color of the object using a preset.
|
|
unsigned char | getR () const |
| Get the Red value of the color.
|
|
unsigned char | getG () const |
| Get the Green value of the color.
|
|
unsigned char | getB () const |
| Get the Blue value of the color.
|
|
unsigned char | getA () const |
| Get the Alpha value of the color.
|
|
This class is used to represent a color in the RGBA format.
◆ Color() [1/4]
Axle::Color::Color |
( |
unsigned char | r, |
|
|
unsigned char | g, |
|
|
unsigned char | b, |
|
|
unsigned char | a ) |
Construct a new Color object using RGBA values.
- Parameters
-
r | Red value (0-255) |
g | Green value (0-255) |
b | Blue value (0-255) |
a | Alpha value (0-255) |
◆ Color() [2/4]
Axle::Color::Color |
( |
unsigned char | r, |
|
|
unsigned char | g, |
|
|
unsigned char | b ) |
Construct a new Color object using RGB values.
- Parameters
-
r | Red value (0-255) |
g | Green value (0-255) |
b | Blue value (0-255) |
- Note
- The alpha value is set to 255
◆ Color() [3/4]
Construct a new Color object.
- Note
- The color is set to transparent (0, 0, 0, 0)
◆ Color() [4/4]
Construct a new Color object using a preset.
- Parameters
-
◆ getA()
unsigned char Axle::Color::getA |
( |
| ) |
const |
Get the Alpha value of the color.
- Returns
- unsigned char Alpha value (0-255)
◆ getB()
unsigned char Axle::Color::getB |
( |
| ) |
const |
Get the Blue value of the color.
- Returns
- unsigned char Blue value (0-255)
◆ getG()
unsigned char Axle::Color::getG |
( |
| ) |
const |
Get the Green value of the color.
- Returns
- unsigned char Green value (0-255)
◆ getR()
unsigned char Axle::Color::getR |
( |
| ) |
const |
Get the Red value of the color.
- Returns
- unsigned char Red value (0-255)
◆ setA()
void Axle::Color::setA |
( |
unsigned char | a | ) |
|
Set the Alpha value of the color.
- Parameters
-
◆ setB()
void Axle::Color::setB |
( |
unsigned char | b | ) |
|
Set the Blue value of the color.
- Parameters
-
◆ setColor() [1/2]
Set the color of the object using a preset.
- Parameters
-
◆ setColor() [2/2]
void Axle::Color::setColor |
( |
unsigned char | r, |
|
|
unsigned char | g, |
|
|
unsigned char | b, |
|
|
unsigned char | a ) |
Set the color of the object using RGBA values.
- Parameters
-
r | Red value (0-255) |
g | Green value (0-255) |
b | Blue value (0-255) |
a | Alpha value (0-255) |
◆ setG()
void Axle::Color::setG |
( |
unsigned char | g | ) |
|
Set the Green value of the color.
- Parameters
-
◆ setR()
void Axle::Color::setR |
( |
unsigned char | r | ) |
|
Set the Red value of the color.
- Parameters
-
The documentation for this class was generated from the following files:
- axle/include/color.h
- axle/src/color.cpp