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.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
epaper::MultiPlaneFramebuffer< PlaneCount > Class Template Reference

#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.
 

Constructor & Destructor Documentation

◆ MultiPlaneFramebuffer()

template<internal::PlaneCount PlaneCount>
epaper::MultiPlaneFramebuffer< PlaneCount >::MultiPlaneFramebuffer ( std::size_t  width,
std::size_t  height,
DisplayMode  mode 
)

Construct a multi-plane framebuffer.

Parameters
widthFramebuffer width in pixels
heightFramebuffer height in pixels
modeDisplay mode (must match plane count)
Here is the call graph for this function:

Member Function Documentation

◆ clear()

template<internal::PlaneCount PlaneCount>
auto epaper::MultiPlaneFramebuffer< PlaneCount >::clear ( Color  color) -> void

Clear the framebuffer to a color.

Parameters
colorFill color
Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

template<internal::PlaneCount PlaneCount>
auto epaper::MultiPlaneFramebuffer< PlaneCount >::data ( ) const -> std::span<const std::byte>

Get raw buffer as a byte span (first plane).

Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.

◆ get_pixel()

template<internal::PlaneCount PlaneCount>
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.

Parameters
xX coordinate (logical)
yY coordinate (logical)
orientationDisplay orientation
Returns
Color at position
Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.
Here is the call graph for this function:

◆ get_planes()

template<internal::PlaneCount PlaneCount>
auto epaper::MultiPlaneFramebuffer< PlaneCount >::get_planes ( ) const -> std::vector<std::span<const std::byte>>

Get plane spans (one per plane).

Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.

◆ height()

template<internal::PlaneCount PlaneCount>
auto epaper::MultiPlaneFramebuffer< PlaneCount >::height ( ) const -> std::size_t

Get framebuffer height in pixels.

Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.

◆ mode()

template<internal::PlaneCount PlaneCount>
auto epaper::MultiPlaneFramebuffer< PlaneCount >::mode ( ) const -> DisplayMode

Get display mode represented by this framebuffer.

Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.
Here is the caller graph for this function:

◆ set_pixel()

template<internal::PlaneCount PlaneCount>
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.

Parameters
xX coordinate (logical)
yY coordinate (logical)
colorColor to set
orientationDisplay orientation
Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.
Here is the call graph for this function:

◆ supports_mode()

template<internal::PlaneCount PlaneCount>
static constexpr auto epaper::MultiPlaneFramebuffer< PlaneCount >::supports_mode ( DisplayMode  mode) -> bool
inlinestaticconstexprnoexcept

Check if the mode is compatible with this plane count.

Parameters
modeDisplay mode
Returns
true if the plane count matches
Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.
Here is the call graph for this function:

◆ width()

template<internal::PlaneCount PlaneCount>
auto epaper::MultiPlaneFramebuffer< PlaneCount >::width ( ) const -> std::size_t

Get framebuffer width in pixels.

Examples
/mnt/nas/libepaper/include/epaper/core/framebuffer.hpp.

The documentation for this class was generated from the following files: