Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

RollCount Class Reference

#include <animation.h>

Inheritance diagram for RollCount:

Animation List of all members.

Detailed Description

This animation generates a mechanical-style rolling counter that counts from a given number of seconds towards 0.


Public Member Functions

void param (int fps, int from, int digits, int groupspacing=5, RGBA *background=NULL, int marginx=0, int marginy=0, int shift=0, int digitsize=0)

Protected Member Functions

virtual Bitmapgetframe (int skip=0)
void prepare ()

Protected Attributes

int _fps
int _from
int _digits
int _groupspacing
int _marginx
int _marginy
int _shift
int _digitsize
RGBA _figures [10]
RGBA _empty
std::auto_ptr< RGBA_background
int _ready
int _frameno
int _maxw
int _maxh


Member Function Documentation

void RollCount::param int  fps,
int  from,
int  digits,
int  groupspacing = 5,
RGBA background = NULL,
int  marginx = 0,
int  marginy = 0,
int  shift = 0,
int  digitsize = 0
[inline]
 

Parameters:
fps Specify the framerate that next() will be called with. This value must be correct, or the seconds will be too long or too short.
from The initial value, in seconds, of the counter.
digits Number of digits shown.
groupspacing Extra space, in pixels, between pairs of digits (e.g. in a time value like 2:03:58).
background An RGBA image that will be shown behind the counter always. When using this, it will only look right if digits, groupspacing, marginx, marginy and digitsize are tuned to suit this image.
marginx,marginy Where to place the counter inside the background, if one is given. Otherwise these parameters are ignored.
shift The number of frames that the digits to the left will lag behind those to the right. This makes it look more mechanical when multiple digits are changing.
digitsize The font size for printing the digits. When it has to match a background, this is best given as a negative value, which is interpreted as absolute.


The documentation for this class was generated from the following files:
Generated on Sun Oct 19 17:34:48 2003 for rve by doxygen 1.3.3