ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
animation.h
Go to the documentation of this file.
1#pragma once
3
4namespace esphome::animation {
5
6class Animation final : public image::Image {
7 public:
8 Animation(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, image::ImageType type,
9 image::Transparency transparent, bool big_endian = false);
10
12 int get_current_frame() const;
13 void next_frame();
14 void prev_frame();
15
20 void set_frame(int frame);
21
22 void set_loop(uint32_t start_frame, uint32_t end_frame, int count);
23
24 protected:
25 void update_data_start_();
26
27 const uint8_t *animation_data_start_;
34};
35
36} // namespace esphome::animation
uint32_t get_animation_frame_count() const
Definition animation.cpp:24
const uint8_t * animation_data_start_
Definition animation.h:27
void set_loop(uint32_t start_frame, uint32_t end_frame, int count)
Definition animation.cpp:17
void set_frame(int frame)
Selects a specific frame within the animation.
Definition animation.cpp:49
Animation(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, image::ImageType type, image::Transparency transparent, bool big_endian=false)
Definition animation.cpp:7
uint8_t type
unsigned count
Definition gif.cpp:51
static void uint32_t