#include <image.h>
|
| | Image (const uint8_t *data_start, int width, int height, ImageType type, Transparency transparency, bool big_endian=false) |
| | big_endian is the RGB565 byte order; codegen writes little endian unless configured otherwise.
|
| |
| 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 |
| |
| virtual lv_image_dsc_t * | get_lv_image_dsc () |
| |
| virtual void | add_lvgl_widget (lv_obj_t *obj) |
| | Called when an LVGL image widget is given this image.
|
| |
|
| template<bool ROWS_OUTER> |
| void | draw_ (int x, int y, display::Display *display, Color color_on, Color color_off, int x_start, int x_end, int y_start, int y_end) |
| | Per-pixel draw of the clipped range, rows (true) or columns (false) outer.
|
| |
| bool | get_binary_pixel_ (int x, int y) const |
| |
| Color | get_rgb111_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 |
| |
Definition at line 25 of file image.h.
◆ Image()
| esphome::image::Image::Image |
( |
const uint8_t * | data_start, |
|
|
int | width, |
|
|
int | height, |
|
|
ImageType | type, |
|
|
Transparency | transparency, |
|
|
bool | big_endian = false ) |
big_endian is the RGB565 byte order; codegen writes little endian unless configured otherwise.
Definition at line 310 of file image.cpp.
◆ add_lvgl_widget()
| virtual void esphome::image::Image::add_lvgl_widget |
( |
lv_obj_t * | obj | ) |
|
|
inlinevirtual |
Called when an LVGL image widget is given this image.
An image whose size can change keeps the widget, so it can give the widget its source again when the size changes: the widget keeps the size it read from the descriptor.
Reimplemented in esphome::runtime_image::RuntimeImage.
Definition at line 51 of file image.h.
◆ draw()
◆ draw_()
template<bool ROWS_OUTER>
| void esphome::image::Image::draw_ |
( |
int | x, |
|
|
int | y, |
|
|
display::Display * | display, |
|
|
Color | color_on, |
|
|
Color | color_off, |
|
|
int | x_start, |
|
|
int | x_end, |
|
|
int | y_start, |
|
|
int | y_end ) |
|
protected |
Per-pixel draw of the clipped range, rows (true) or columns (false) outer.
Definition at line 82 of file image.cpp.
◆ get_binary_pixel_()
| bool esphome::image::Image::get_binary_pixel_ |
( |
int | x, |
|
|
int | y ) const |
|
protected |
◆ get_bpp()
| int esphome::image::Image::get_bpp |
( |
| ) |
const |
|
inline |
◆ get_data_start()
| const uint8_t * esphome::image::Image::get_data_start |
( |
| ) |
const |
|
inline |
◆ get_grayscale_pixel_()
| Color esphome::image::Image::get_grayscale_pixel_ |
( |
int | x, |
|
|
int | y ) const |
|
protected |
◆ get_height()
| int esphome::image::Image::get_height |
( |
| ) |
const |
|
overridevirtual |
◆ get_lv_image_dsc()
| lv_image_dsc_t * esphome::image::Image::get_lv_image_dsc |
( |
| ) |
|
|
virtual |
◆ get_pixel()
◆ get_rgb111_pixel_()
| Color esphome::image::Image::get_rgb111_pixel_ |
( |
int | x, |
|
|
int | y ) const |
|
protected |
◆ get_rgb565_pixel_()
| Color esphome::image::Image::get_rgb565_pixel_ |
( |
int | x, |
|
|
int | y ) const |
|
protected |
◆ get_rgb_pixel_()
| Color esphome::image::Image::get_rgb_pixel_ |
( |
int | x, |
|
|
int | y ) const |
|
protected |
◆ get_type()
| ImageType esphome::image::Image::get_type |
( |
| ) |
const |
◆ get_width()
| int esphome::image::Image::get_width |
( |
| ) |
const |
|
overridevirtual |
◆ get_width_stride()
| size_t esphome::image::Image::get_width_stride |
( |
| ) |
const |
|
inline |
Return the stride of the image in bytes, that is, the distance in bytes between two consecutive rows of pixels.
Definition at line 40 of file image.h.
◆ has_transparency()
| bool esphome::image::Image::has_transparency |
( |
| ) |
const |
|
inline |
◆ big_endian_
| bool esphome::image::Image::big_endian_ |
|
protected |
◆ bpp_
| uint8_t esphome::image::Image::bpp_ {} |
|
protected |
◆ data_start_
| const uint8_t* esphome::image::Image::data_start_ |
|
protected |
◆ dsc_
| lv_img_dsc_t esphome::image::Image::dsc_ {} |
|
protected |
◆ height_
| int esphome::image::Image::height_ |
|
protected |
◆ transparency_
◆ type_
◆ width_
| int esphome::image::Image::width_ |
|
protected |
The documentation for this class was generated from the following files: