63 [[nodiscard]]
auto width()
const -> std::size_t;
65 [[nodiscard]]
auto height()
const -> std::size_t;
69 [[nodiscard]]
auto data()
const -> std::span<const std::byte>;
71 [[nodiscard]]
auto get_planes()
const -> std::vector<std::span<const std::byte>>;
106 std::size_t stride_{0};
108 std::vector<std::byte> buffer_;
163 [[nodiscard]]
auto width()
const -> std::size_t;
165 [[nodiscard]]
auto height()
const -> std::size_t;
169 [[nodiscard]]
auto data()
const -> std::span<const std::byte>;
171 [[nodiscard]]
auto get_planes()
const -> std::vector<std::span<const std::byte>>;
209 std::array<std::vector<std::byte>, PLANE_COUNT> planes_;
Definition framebuffer.hpp:51
auto data() const -> std::span< const std::byte >
Get raw buffer as a byte span.
Definition mono_framebuffer.cpp:63
auto clear(Color color) -> void
Clear the framebuffer to a color.
Definition mono_framebuffer.cpp:265
auto mode() const -> DisplayMode
Get display mode represented by this framebuffer.
Definition mono_framebuffer.cpp:61
static constexpr auto supports_mode(DisplayMode mode) noexcept -> bool
Check if the mode is compatible with mono framebuffer.
Definition framebuffer.hpp:99
auto height() const -> std::size_t
Get framebuffer height in pixels.
Definition mono_framebuffer.cpp:59
auto get_pixel(std::size_t x, std::size_t y, Orientation orientation) const -> Color
Get a pixel color with orientation transform.
Definition mono_framebuffer.cpp:190
auto get_planes() const -> std::vector< std::span< const std::byte > >
Get plane spans (single plane for mono).
Definition mono_framebuffer.cpp:65
auto width() const -> std::size_t
Get framebuffer width in pixels.
Definition mono_framebuffer.cpp:57
auto set_pixel(std::size_t x, std::size_t y, Color color, Orientation orientation) -> void
Set a pixel with orientation transform.
Definition mono_framebuffer.cpp:67
Definition framebuffer.hpp:151
static constexpr auto supports_mode(DisplayMode mode) noexcept -> bool
Check if the mode is compatible with this plane count.
Definition framebuffer.hpp:199
auto clear(Color color) -> void
Clear the framebuffer to a color.
Definition multi_plane_framebuffer.cpp:125
auto set_pixel(std::size_t x, std::size_t y, Color color, Orientation orientation) -> void
Set a pixel with orientation transform.
Definition multi_plane_framebuffer.cpp:53
auto height() const -> std::size_t
Get framebuffer height in pixels.
Definition multi_plane_framebuffer.cpp:29
auto get_planes() const -> std::vector< std::span< const std::byte > >
Get plane spans (one per plane).
Definition multi_plane_framebuffer.cpp:43
auto width() const -> std::size_t
Get framebuffer width in pixels.
Definition multi_plane_framebuffer.cpp:25
auto mode() const -> DisplayMode
Get display mode represented by this framebuffer.
Definition multi_plane_framebuffer.cpp:33
auto get_pixel(std::size_t x, std::size_t y, Orientation orientation) const -> Color
Get a pixel color with orientation transform.
Definition multi_plane_framebuffer.cpp:107
auto data() const -> std::span< const std::byte >
Get raw buffer as a byte span (first plane).
Definition multi_plane_framebuffer.cpp:38
Definition framebuffer_concepts.hpp:60
Internal utilities for libepaper implementation details.
constexpr auto plane_count_value(PlaneCount count) noexcept -> std::size_t
Definition internal.hpp:63
constexpr std::size_t PLANE_COUNT_ONE
Number of planes for single-plane displays (BW, Gray4, Spectra6)
Definition internal.hpp:23
constexpr auto num_planes(DisplayMode mode) noexcept -> std::size_t
Get number of color planes required for a display mode.
Definition driver.hpp:97
Orientation
Definition types.hpp:66
Color
Definition types.hpp:32
DisplayMode
Definition driver.hpp:46