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.
◆ component_type
The type of the components of the color.
Definition at line 82 of file pixel.hpp.
◆ rgba_pixel() [1/4]
claw::graphic::rgba_pixel::rgba_pixel |
( |
| ) |
|
Default constructor.
Definition at line 179 of file pixel.cpp.
◆ rgba_pixel() [2/4]
claw::graphic::rgba_pixel::rgba_pixel |
( |
const rgb_pixel & | that | ) |
|
Constructor.
- Parameters
-
Definition at line 187 of file pixel.cpp.
◆ rgba_pixel() [3/4]
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() [4/4]
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.
◆ alpha
◆ blue
Blue component.
Definition at line 99 of file pixel.hpp.
◆ green
Green component.
Definition at line 96 of file pixel.hpp.
◆ pixel
unsigned int claw::graphic::rgba_pixel::pixel |
Compressed representation.
Definition at line 87 of file pixel.hpp.
◆ red
Red component.
Definition at line 93 of file pixel.hpp.
The documentation for this struct was generated from the following files: