representation d'une couleur (rgba) transparente ou opaque.
More...
#include <color.h>
|
| | Color () |
| | constructeur par defaut.
|
| |
| | Color (const float _r, const float _g, const float _b, const float _a=1.f) |
| |
| | Color (const float _value) |
| |
| | Color (const Color &color, const float alpha) |
| | cree une couleur avec les memes composantes que color, mais remplace sa composante alpha (color.r, color.g, color.b, alpha).
|
| |
| float | power () const |
| |
| float | max () const |
| |
|
| float | r |
| |
| float | g |
| |
| float | b |
| |
| float | a |
| |
representation d'une couleur (rgba) transparente ou opaque.
Definition at line 13 of file color.h.
◆ Color() [1/4]
constructeur par defaut.
Definition at line 16 of file color.h.
16: r(0.f), g(0.f), b(0.f), a(1.f) {}
◆ Color() [2/4]
| Color::Color |
( |
const float |
_r, |
|
|
const float |
_g, |
|
|
const float |
_b, |
|
|
const float |
_a = 1.f |
|
) |
| |
|
inlineexplicit |
Definition at line 17 of file color.h.
17: r(_r), g(_g), b(_b), a(_a) {}
◆ Color() [3/4]
| Color::Color |
( |
const float |
_value | ) |
|
|
inlineexplicit |
Definition at line 18 of file color.h.
18: r(_value), g(_value), b(_value), a(1.f) {}
◆ Color() [4/4]
| Color::Color |
( |
const Color & |
color, |
|
|
const float |
alpha |
|
) |
| |
|
inline |
cree une couleur avec les memes composantes que color, mais remplace sa composante alpha (color.r, color.g, color.b, alpha).
Definition at line 21 of file color.h.
21: r(color.r), g(color.g), b(color.b), a(alpha) {}
◆ power()
| float Color::power |
( |
| ) |
const |
Definition at line 8 of file color.cpp.
9{
10 return (r+g+b) / 3;
11}
◆ max()
| float Color::max |
( |
| ) |
const |
Definition at line 13 of file color.cpp.
14{
15 return std::max(r, std::max(g, std::max(b, float(0))));
16}
The documentation for this struct was generated from the following files: