RGBA pixel.
More...
#include <pixel.hpp>
|
typedef unsigned char | component_type |
| The type of the components of the color.
|
|
RGBA pixel.
Definition at line 79 of file pixel.hpp.
◆ rgba_pixel() [1/3]
claw::graphic::rgba_pixel::rgba_pixel |
( |
const rgb_pixel & |
that | ) |
|
Constructor.
- Parameters
-
Definition at line 187 of file pixel.cpp.
◆ rgba_pixel() [2/3]
Constructor.
- Parameters
-
r | The value of the red field. |
g | The value of the green field. |
b | The value of the blue field. |
a | The value of the alpha field. |
Definition at line 202 of file pixel.cpp.
◆ rgba_pixel() [3/3]
claw::graphic::rgba_pixel::rgba_pixel |
( |
const std::string & |
c | ) |
|
|
explicit |
Constructor from a color name or code.
- Parameters
-
Definition at line 215 of file pixel.cpp.
◆ luminosity()
Get the luminosity of the pixel.
- Returns
- The luminosity between 0 (dark) and 255 (light).
The luminosity is approximated with integers:
Definition at line 286 of file pixel.cpp.
◆ operator!=()
bool claw::graphic::rgba_pixel::operator!= |
( |
const rgba_pixel & |
that | ) |
const |
Tell if two pixels are different.
- Parameters
-
Definition at line 271 of file pixel.cpp.
◆ operator=()
Assignement operator.
- Parameters
-
Definition at line 248 of file pixel.cpp.
◆ operator==()
bool claw::graphic::rgba_pixel::operator== |
( |
const rgba_pixel & |
that | ) |
const |
Tell if two pixels are equal.
- Parameters
-
Definition at line 262 of file pixel.cpp.
The documentation for this struct was generated from the following files: