Represents a pixel with three color channels and 8 bits of color depth.
More...
#include <Pixel.h>
|
| Pixel () noexcept |
| Constructor.
|
|
| Pixel (unsigned char red, unsigned char green, unsigned char blue) noexcept |
| Constructor.
|
|
unsigned char | getRed () const noexcept |
| Returns the red color value.
|
|
unsigned char | getGreen () const noexcept |
| Returns the green color value.
|
|
unsigned char | getBlue () const noexcept |
| Returns the blue color value.
|
|
bool | operator== (const Pixel &rhs) const noexcept |
| Equal operator.
|
|
bool | operator!= (const Pixel &rhs) const noexcept |
| Unequal operator.
|
|
std::string | toString () const noexcept |
| Returns a string representation of the pixel (red, green, blue).
|
|
Represents a pixel with three color channels and 8 bits of color depth.
◆ Pixel()
optris::Pixel::Pixel |
( |
unsigned char | red, |
|
|
unsigned char | green, |
|
|
unsigned char | blue ) |
|
inlinenoexcept |
Constructor.
- Parameters
-
[in] | red | color value in [0, 255]. |
[in] | green | color value in [0, 255]. |
[in] | blue | color value in [0, 255]. |
◆ getBlue()
unsigned char optris::Pixel::getBlue |
( |
| ) |
const |
|
inlinenoexcept |
Returns the blue color value.
- Returns
- blue color value in [0, 255].
◆ getGreen()
unsigned char optris::Pixel::getGreen |
( |
| ) |
const |
|
inlinenoexcept |
Returns the green color value.
- Returns
- green color value in [0, 255].
◆ getRed()
unsigned char optris::Pixel::getRed |
( |
| ) |
const |
|
inlinenoexcept |
Returns the red color value.
- Returns
- red color value in [0, 255].
◆ toString()
std::string optris::Pixel::toString |
( |
| ) |
const |
|
inlinenoexcept |
Returns a string representation of the pixel (red, green, blue).
- Returns
- string representation of the pixel.
The documentation for this class was generated from the following file: