These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.
optris::Pixel
Represents a pixel with three color channels and 8 bits of color depth.
Public functions
Pixel
Pixel() noexcept
Constructor.
Pixel
Pixel(unsigned char red, unsigned char green, unsigned char blue) noexcept
Constructor.
Parameters
| Name | Description |
|---|---|
red |
color value in [0, 255]. |
green |
color value in [0, 255]. |
blue |
color value in [0, 255]. |
getRed
unsigned char getRed() const noexcept
Returns the red color value.
Returns: red color value in [0, 255].
getGreen
unsigned char getGreen() const noexcept
Returns the green color value.
Returns: green color value in [0, 255].
getBlue
unsigned char getBlue() const noexcept
Returns the blue color value.
Returns: blue color value in [0, 255].
operator==
bool operator==(const Pixel &rhs) const noexcept
Equal operator.
operator!=
bool operator!=(const Pixel &rhs) const noexcept
Unequal operator.
toString
std::string toString() const noexcept
Returns a string representation of the pixel (red, green, blue).
Returns: string representation of the pixel.