ESPHome  2022.6.2
Public Member Functions | Protected Attributes
esphome::display::Animation Class Reference

#include <display_buffer.h>

Inheritance diagram for esphome::display::Animation:
esphome::display::Image

Public Member Functions

 Animation (const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, ImageType type)
 
bool get_pixel (int x, int y) const override
 
Color get_color_pixel (int x, int y) const override
 
Color get_rgb565_pixel (int x, int y) const override
 
Color get_grayscale_pixel (int x, int y) const override
 
int get_animation_frame_count () const
 
int get_current_frame () const
 
void next_frame ()
 
void prev_frame ()
 
- Public Member Functions inherited from esphome::display::Image
 Image (const uint8_t *data_start, int width, int height, ImageType type)
 
int get_width () const
 
int get_height () const
 
ImageType get_type () const
 

Protected Attributes

int current_frame_
 
int animation_frame_count_
 
- Protected Attributes inherited from esphome::display::Image
int width_
 
int height_
 
ImageType type_
 
const uint8_t * data_start_
 

Detailed Description

Definition at line 481 of file display_buffer.h.

Constructor & Destructor Documentation

◆ Animation()

esphome::display::Animation::Animation ( const uint8_t *  data_start,
int  width,
int  height,
uint32_t  animation_frame_count,
ImageType  type 
)

Definition at line 577 of file display_buffer.cpp.

Member Function Documentation

◆ get_animation_frame_count()

int esphome::display::Animation::get_animation_frame_count ( ) const

Definition at line 579 of file display_buffer.cpp.

◆ get_color_pixel()

Color esphome::display::Animation::get_color_pixel ( int  x,
int  y 
) const
overridevirtual

Reimplemented from esphome::display::Image.

Definition at line 541 of file display_buffer.cpp.

◆ get_current_frame()

int esphome::display::Animation::get_current_frame ( ) const

Definition at line 580 of file display_buffer.cpp.

◆ get_grayscale_pixel()

Color esphome::display::Animation::get_grayscale_pixel ( int  x,
int  y 
) const
overridevirtual

Reimplemented from esphome::display::Image.

Definition at line 567 of file display_buffer.cpp.

◆ get_pixel()

bool esphome::display::Animation::get_pixel ( int  x,
int  y 
) const
overridevirtual

Reimplemented from esphome::display::Image.

Definition at line 531 of file display_buffer.cpp.

◆ get_rgb565_pixel()

Color esphome::display::Animation::get_rgb565_pixel ( int  x,
int  y 
) const
overridevirtual

Reimplemented from esphome::display::Image.

Definition at line 553 of file display_buffer.cpp.

◆ next_frame()

void esphome::display::Animation::next_frame ( )

Definition at line 581 of file display_buffer.cpp.

◆ prev_frame()

void esphome::display::Animation::prev_frame ( )

Definition at line 587 of file display_buffer.cpp.

Field Documentation

◆ animation_frame_count_

int esphome::display::Animation::animation_frame_count_
protected

Definition at line 496 of file display_buffer.h.

◆ current_frame_

int esphome::display::Animation::current_frame_
protected

Definition at line 495 of file display_buffer.h.


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