|
libepaper 2.0.0
A C++23 library for controlling Waveshare e-paper displays on Raspberry Pi, featuring transparent sleep/wake management and a fluent builder API.
|
#include <framebuffer.hpp>
Public Member Functions | |
| MultiPlaneFramebuffer (std::size_t width, std::size_t height, DisplayMode mode) | |
| Construct a multi-plane framebuffer. | |
| auto | width () const -> std::size_t |
| Get framebuffer width in pixels. | |
| auto | height () const -> std::size_t |
| Get framebuffer height in pixels. | |
| auto | mode () const -> DisplayMode |
| Get display mode represented by this framebuffer. | |
| auto | data () const -> std::span< const std::byte > |
| Get raw buffer as a byte span (first plane). | |
| auto | get_planes () const -> std::vector< std::span< const std::byte > > |
| Get plane spans (one per plane). | |
| auto | set_pixel (std::size_t x, std::size_t y, Color color, Orientation orientation) -> void |
| Set a pixel with orientation transform. | |
| auto | get_pixel (std::size_t x, std::size_t y, Orientation orientation) const -> Color |
| Get a pixel color with orientation transform. | |
| auto | clear (Color color) -> void |
| Clear the framebuffer to a color. | |
Static Public Member Functions | |
| static constexpr auto | supports_mode (DisplayMode mode) noexcept -> bool |
| Check if the mode is compatible with this plane count. | |
| epaper::MultiPlaneFramebuffer< PlaneCount >::MultiPlaneFramebuffer | ( | std::size_t | width, |
| std::size_t | height, | ||
| DisplayMode | mode | ||
| ) |
Construct a multi-plane framebuffer.
| width | Framebuffer width in pixels |
| height | Framebuffer height in pixels |
| mode | Display mode (must match plane count) |

| auto epaper::MultiPlaneFramebuffer< PlaneCount >::clear | ( | Color | color | ) | -> void |
Clear the framebuffer to a color.
| color | Fill color |


| auto epaper::MultiPlaneFramebuffer< PlaneCount >::data | ( | ) | const -> std::span<const std::byte> |
Get raw buffer as a byte span (first plane).
| auto epaper::MultiPlaneFramebuffer< PlaneCount >::get_pixel | ( | std::size_t | x, |
| std::size_t | y, | ||
| Orientation | orientation | ||
| ) | const -> Color |
Get a pixel color with orientation transform.
| x | X coordinate (logical) |
| y | Y coordinate (logical) |
| orientation | Display orientation |

| auto epaper::MultiPlaneFramebuffer< PlaneCount >::get_planes | ( | ) | const -> std::vector<std::span<const std::byte>> |
Get plane spans (one per plane).
| auto epaper::MultiPlaneFramebuffer< PlaneCount >::height | ( | ) | const -> std::size_t |
Get framebuffer height in pixels.
| auto epaper::MultiPlaneFramebuffer< PlaneCount >::mode | ( | ) | const -> DisplayMode |
Get display mode represented by this framebuffer.

| auto epaper::MultiPlaneFramebuffer< PlaneCount >::set_pixel | ( | std::size_t | x, |
| std::size_t | y, | ||
| Color | color, | ||
| Orientation | orientation | ||
| ) | -> void |
Set a pixel with orientation transform.
| x | X coordinate (logical) |
| y | Y coordinate (logical) |
| color | Color to set |
| orientation | Display orientation |

|
inlinestaticconstexprnoexcept |
Check if the mode is compatible with this plane count.
| mode | Display mode |

| auto epaper::MultiPlaneFramebuffer< PlaneCount >::width | ( | ) | const -> std::size_t |
Get framebuffer width in pixels.