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.
Stop player thread (if MT) and cleans RasterPlayer.
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.
Plays the animation at the speed (frame rate) defined in the file.
Stops the animation. The control will show the last picture (page or frame) rendered.
If RasterPlayer is stopped, it will show the next picture (page or frame).
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.
Gets the number of pictures (pages or frames) in the file.
Gets the active page (frame).
void SetPage(int i)
Sets the active page (frame).
Called when a new picture (page or frame) is shown.