color representation in RGBA
More...
#include <color.hpp>
|
|
| RGBA ()=default |
| | default ctor, initialized as RGBA(0, 0, 0, 0)
|
| |
| | RGBA (float r, float g, float b, float a) |
| | construct
|
| |
|
| RGBA (glm::vec4) |
| | construct from mousetrap::Vector4f
|
| |
|
| operator glm::vec4 () const |
| | return as mousetrap::Vector4f
|
| |
| | RGBA (HSVA) |
| | convert hsva to rgba
|
| |
|
| operator HSVA () const |
| | convert rbga to hsva
|
| |
|
| operator std::string () const |
| | serialize
|
| |
| bool | operator== (const RGBA &other) |
| | comparison operator
|
| |
| bool | operator!= (const RGBA &other) |
| | comparison operator
|
| |
|
|
float | r = 0 |
| | red, in [0, 1]
|
| |
|
float | g = 0 |
| | green, in [0, 1]
|
| |
|
float | b = 0 |
| | blue, in [0, 1]
|
| |
|
float | a = 0 |
| | transparency, in [0, 1]
|
| |
color representation in RGBA
◆ RGBA() [1/2]
| mousetrap::RGBA::RGBA |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a |
|
) |
| |
construct
- Parameters
-
| r | red value, in [0, 1] |
| g | green value, in [0, 1] |
| b | blue value, in [0, 1] |
| a | alpha value, in [0, 1] |
◆ RGBA() [2/2]
| mousetrap::RGBA::RGBA |
( |
HSVA |
hsva | ) |
|
|
explicit |
convert hsva to rgba
- Parameters
-
References a, b, g, and r.
◆ operator!=()
| bool mousetrap::RGBA::operator!= |
( |
const RGBA & |
other | ) |
|
comparison operator
- Parameters
-
- Returns
- true if all components do not exaclty equal eachother, false otherwise. This is subject to issues stemming from float precision, consider quantizing the colors before comparison
◆ operator==()
| bool mousetrap::RGBA::operator== |
( |
const RGBA & |
other | ) |
|
comparison operator
- Parameters
-
- Returns
- true if all components exactly equal eachother, false otherwise. This is subject to issues stemming from float precision, consider quantizing the colors before comparison
References a, b, g, and r.
The documentation for this struct was generated from the following files:
- /home/clem/Workspace/mousetrap/include/mousetrap/color.hpp
- /home/clem/Workspace/mousetrap/src/color.cpp