ESPHome 2026.8.0b4
Loading...
Searching...
No Matches
esphome::sendspin_::ArtworkImageView Class Reference

A non-owning image::Image view over a buffer owned by SendspinImageSlot. More...

#include <sendspin_image.h>

Inheritance diagram for esphome::sendspin_::ArtworkImageView:
esphome::image::Image esphome::display::BaseImage

Public Member Functions

void set_frame (const uint8_t *data, int width, int height)
 
void set_showing_artwork (bool showing_artwork)
 Records whether the frame on show is real artwork rather than the black it starts as.
 
void set_placeholder (image::Image *placeholder)
 
void draw (int x, int y, display::Display *display, Color color_on, Color color_off) override
 
- Public Member Functions inherited from esphome::image::Image
 Image (const uint8_t *data_start, int width, int height, ImageType type, Transparency transparency)
 
Color get_pixel (int x, int y, Color color_on=display::COLOR_ON, Color color_off=display::COLOR_OFF) const
 
int get_width () const override
 
int get_height () const override
 
const uint8_t * get_data_start () const
 
ImageType get_type () const
 
int get_bpp () const
 
size_t get_width_stride () const
 Return the stride of the image in bytes, that is, the distance in bytes between two consecutive rows of pixels.
 
void draw (int x, int y, display::Display *display, Color color_on, Color color_off) override
 
bool has_transparency () const
 
lv_image_dsc_t * get_lv_image_dsc ()
 
- Public Member Functions inherited from esphome::display::BaseImage

Protected Attributes

image::Imageplaceholder_ {nullptr}
 
bool showing_artwork_ {false}
 
- Protected Attributes inherited from esphome::image::Image
int width_
 
int height_
 
ImageType type_
 
const uint8_t * data_start_
 
Transparency transparency_
 
size_t bpp_ {}
 
size_t stride_ {}
 
lv_img_dsc_t dsc_ {}
 

Additional Inherited Members

- Protected Member Functions inherited from esphome::image::Image
bool get_binary_pixel_ (int x, int y) const
 
Color get_rgb_pixel_ (int x, int y) const
 
Color get_rgb565_pixel_ (int x, int y) const
 
Color get_grayscale_pixel_ (int x, int y) const
 

Detailed Description

A non-owning image::Image view over a buffer owned by SendspinImageSlot.

Each slot publishes its frames through these: one for the artwork on screen, and optionally a second for the outgoing frame during a cross-fade. A view always names a frame, black to begin with, so LVGL can be given it as a widget source before any artwork exists. Main loop only.

Definition at line 42 of file sendspin_image.h.

Member Function Documentation

◆ draw()

void esphome::sendspin_::ArtworkImageView::draw ( int x,
int y,
display::Display * display,
Color color_on,
Color color_off )
inlineoverridevirtual

Implements esphome::display::BaseImage.

Definition at line 66 of file sendspin_image.h.

◆ set_frame()

void esphome::sendspin_::ArtworkImageView::set_frame ( const uint8_t * data,
int width,
int height )
inline

Definition at line 46 of file sendspin_image.h.

◆ set_placeholder()

void esphome::sendspin_::ArtworkImageView::set_placeholder ( image::Image * placeholder)
inline

Definition at line 64 of file sendspin_image.h.

◆ set_showing_artwork()

void esphome::sendspin_::ArtworkImageView::set_showing_artwork ( bool showing_artwork)
inline

Records whether the frame on show is real artwork rather than the black it starts as.

Only changes what the display lambda path draws. The frame itself is left alone, so anything reading the pixels directly (an LVGL widget) keeps drawing the last artwork until it is pointed elsewhere.

Definition at line 62 of file sendspin_image.h.

Field Documentation

◆ placeholder_

image::Image* esphome::sendspin_::ArtworkImageView::placeholder_ {nullptr}
protected

Definition at line 79 of file sendspin_image.h.

◆ showing_artwork_

bool esphome::sendspin_::ArtworkImageView::showing_artwork_ {false}
protected

Definition at line 80 of file sendspin_image.h.


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