Smart Matrix
AnimatedImage Class Reference

AnimateImage implementation for raw gif files. More...

#include <AnimatedImage.hpp>

Inheritance diagram for AnimatedImage:
Graphics

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.
 
- Public Member Functions inherited from Graphics
 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.
 
ScreengetScreen () 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

- Protected Attributes inherited from Graphics
Screenw
 
vector size
 
vector location
 

Detailed Description

AnimateImage implementation for raw gif files.

A class used to draw raw gif animations on the screen.

Constructor & Destructor Documentation

AnimatedImage::AnimatedImage ( Screen w,
const uint8_t *  image,
vector  location = vector(0,0) 
)
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.

Member Function Documentation

void AnimatedImage::draw ( )
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.


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