Smart Matrix
|
AnimateImage implementation for raw gif files. More...
#include <AnimatedImage.hpp>
Public Member Functions | |
AnimatedImage (Screen &w, const uint8_t *image, vector location=vector(0, 0)) | |
AnimatedImage constructor'. More... | |
void | draw () |
draw the animated image on the screen. More... | |
void | draw (int updateInterval, bool loop=false) |
draw the animated image on the screen. More... | |
void | drawFrame (int) |
draw a specefiek frame on the screen. More... | |
int | getTotalFrames () |
Return number of frames of the animatedImage. | |
![]() | |
Graphics (Screen &w, vector size, vector location) | |
Graphics constructor. More... | |
vector | getSize () const |
return the size of a graphics object. | |
vector | getLocation () const |
return the location of a graphics object. | |
Screen & | getScreen () const |
return the screen used by graphics object | |
void | setLocation (vector l) |
change the location of a graphics object. | |
void | setSize (vector s) |
change the size of a graphics object | |
Additional Inherited Members | |
![]() | |
Screen & | w |
vector | size |
vector | location |
AnimateImage implementation for raw gif files.
A class used to draw raw gif animations on the screen.
|
inline |
AnimatedImage constructor'.
Screen is the screen to draw on e.g. matrix. image is the raw gif file converted by a commandline script. After you included the conveted gif animation you can pass it to this function. Location is the location of animated image on the screen.
|
virtual |
draw the animated image on the screen.
You do not need to swap buffers. Default loop is false and update interval is 10 milliseconds.
Implements Graphics.
void AnimatedImage::draw | ( | int | updateInterval, |
bool | loop = false |
||
) |
draw the animated image on the screen.
You do not need to swap buffers. updateInterval is the delay between each frame. if loop is true the animation will be restarted when the last frame showed on the screen.
void AnimatedImage::drawFrame | ( | int | frame | ) |
draw a specefiek frame on the screen.
You need to swap buffer if double buffering is enabled.