#include <color_manager.hpp>
◆ ColorManager()
| epaper::ColorManager::ColorManager |
( |
| ) |
|
|
default |
◆ convert() [1/2]
| static constexpr auto epaper::ColorManager::convert |
( |
const RGB & |
color | ) |
-> DeviceColor<Mode> |
|
inlinestaticconstexprnoexcept |
◆ convert() [2/2]
|
|
inlinestaticconstexprnoexcept |
Generic conversion based on display mode template parameter with alpha.
- Template Parameters
-
- Parameters
-
| color | RGBA color to convert |
| background | Background color for alpha blending |
- Returns
- Device color in specified format
◆ convert_to_bw() [1/2]
|
|
inlinestaticconstexprnoexcept |
◆ convert_to_bw() [2/2]
|
|
inlinestaticconstexprnoexcept |
Convert RGBA color to 1-bit black/white with alpha blending.
- Parameters
-
| color | RGBA color to convert |
| background | Background color for alpha blending |
- Returns
- Device color in 1-bit format
◆ convert_to_bwr()
|
|
inlinestaticconstexprnoexcept |
◆ convert_to_bwy()
|
|
inlinestaticconstexprnoexcept |
◆ convert_to_gray4() [1/2]
|
|
inlinestaticconstexprnoexcept |
◆ convert_to_gray4() [2/2]
|
|
inlinestaticconstexprnoexcept |
Convert RGBA color to 2-bit grayscale with alpha blending.
- Parameters
-
| color | RGBA color to convert |
| background | Background color for alpha blending |
- Returns
- Device color in 2-bit format
◆ convert_to_spectra6()
|
|
inlinestaticconstexprnoexcept |
◆ dither_image()
| static void epaper::ColorManager::dither_image |
( |
std::span< const std::uint8_t > |
rgb_data, |
|
|
std::size_t |
width, |
|
|
std::size_t |
height, |
|
|
SetPixelFunc |
set_pixel |
|
) |
| |
|
inlinestatic |
Dither an RGB image to device colors using Floyd-Steinberg.
- Template Parameters
-
| Mode | Target display mode |
| SetPixelFunc | Function type for setting pixels (x, y, DeviceColor<Mode>) |
- Parameters
-
| rgb_data | Packed RGB data (R, G, B, R, G, B...) |
| width | Image width |
| height | Image height |
| set_pixel | Callback to set quantized pixel |
- Examples
- /mnt/nas/libepaper/include/epaper/color/color_manager.hpp.
◆ to_rgb()
|
|
inlinestaticconstexprnoexcept |
The documentation for this class was generated from the following file: