Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site

SourceForge.net Logo


class RasterPlayer : public Ctrl


As seen in layout designer:



As seen in program:



RasterPlayer is a control to render animated GIF and multipage TIFF files.



Constructor Detail



Initializes RasterPlayer.




Stop player thread (if MT) and cleans RasterPlayer.


Public Member List



bool Load(const String &fileName)

Loads the multipage GIF or TIFF file in fileName.



bool LoadBuffer(const String &buffer)

Loads the multipage GIF or TIFF file stored in buffer. This function is useful when the file is stored in a resource.



void Play()

Plays the animation at the speed (frame rate) defined in the file.



void Stop()

Stops the animation. The control will show the last picture (page or frame) rendered.



void NextFrame()

If RasterPlayer is stopped, it will show the next picture (page or frame).



void NextPage()

As NextFrame().



RasterPlayer& SetBackground(Color c)

Sets the color not filled with the animation and the transparent color.



RasterPlayer& SetSpeed(double s = 1)

It is the playing speed of the animation. Normal value of s is 1.

If s is 2 the animation will be played twice faster as the normal speed.



RasterPlayer& SetMT(bool mt = false)

If the program is compiled with MT, mt indicates if the animation will run in a new thread (true) or in the same thread (false) as the main program.

If the program is not compiled with MT, this option is void as the animation will always run in the same thread as the main program.



int GetPageCount()

Gets the number of pictures (pages or frames) in the file.



int GetFrameCount()

As GetPageCount().



int GetPage()

Gets the active page (frame).



void SetPage(int i)

Sets the active page (frame).



Callback WhenShown

Called when a new picture (page or frame) is shown.


Last edit by koldo on 10/20/2010. Do you want to contribute?. T++