ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
animation
animation.h
Go to the documentation of this file.
1
#pragma once
2
#include "
esphome/components/image/image.h
"
3
4
namespace
esphome::animation
{
5
6
class
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
11
uint32_t
get_animation_frame_count
()
const
;
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_
;
28
int
current_frame_
;
29
uint32_t
animation_frame_count_
;
30
uint32_t
loop_start_frame_
;
31
uint32_t
loop_end_frame_
;
32
int
loop_count_
;
33
int
loop_current_iteration_
;
34
};
35
36
}
// namespace esphome::animation
esphome::animation::Animation
Definition
animation.h:6
esphome::animation::Animation::prev_frame
void prev_frame()
Definition
animation.cpp:40
esphome::animation::Animation::animation_frame_count_
uint32_t animation_frame_count_
Definition
animation.h:29
esphome::animation::Animation::next_frame
void next_frame()
Definition
animation.cpp:26
esphome::animation::Animation::get_animation_frame_count
uint32_t get_animation_frame_count() const
Definition
animation.cpp:24
esphome::animation::Animation::loop_count_
int loop_count_
Definition
animation.h:32
esphome::animation::Animation::update_data_start_
void update_data_start_()
Definition
animation.cpp:63
esphome::animation::Animation::loop_start_frame_
uint32_t loop_start_frame_
Definition
animation.h:30
esphome::animation::Animation::get_current_frame
int get_current_frame() const
Definition
animation.cpp:25
esphome::animation::Animation::loop_end_frame_
uint32_t loop_end_frame_
Definition
animation.h:31
esphome::animation::Animation::loop_current_iteration_
int loop_current_iteration_
Definition
animation.h:33
esphome::animation::Animation::animation_data_start_
const uint8_t * animation_data_start_
Definition
animation.h:27
esphome::animation::Animation::set_loop
void set_loop(uint32_t start_frame, uint32_t end_frame, int count)
Definition
animation.cpp:17
esphome::animation::Animation::set_frame
void set_frame(int frame)
Selects a specific frame within the animation.
Definition
animation.cpp:49
esphome::animation::Animation::current_frame_
int current_frame_
Definition
animation.h:28
esphome::animation::Animation::Animation
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
esphome::image::Image
Definition
image.h:25
type
uint8_t type
Definition
e131_packet.cpp:21
count
unsigned count
Definition
gif.cpp:51
image.h
esphome::animation
Definition
animation.cpp:5
esphome::image::Transparency
Transparency
Definition
image.h:19
esphome::image::ImageType
ImageType
Definition
image.h:11
uint32_t
static void uint32_t
Definition
crash_handler.cpp:153
Generated by
1.12.0