[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.17 Frames/Animation
These functions provide ability to create several pictures simultaneously. For most of cases it is useless but for widget classes (see section Widget classes) they can provide a way to show animation. Also you can write several frames into animated GIF file.
- Method on
mglGraph
(C++, Python):int
NewFrame () - C function:
int
mgl_new_frame (HMGL
gr) Creates new frame. Function returns current frame id. This is not thread safe function in OpenGL mode! Use direct list creation in multi-threading drawing. The function
EndFrame()
must be call after the finishing of the frame drawing for each call of this function.
- Method on
mglGraph
(C++, Python):void
EndFrame () - C function:
void
mgl_end_frame (HMGL
gr) Finishes the frame drawing.
- Method on
mglGraph
(C++, Python):int
GetNumFrame () - C function:
int
mgl_get_num_frame (HMGL
gr) Gets the number of created frames.
- Method on
mglGraph
(C++, Python):void
ResetFrames () - C function:
int
mgl_reset_frames (HMGL
gr) Reset frames counter (start it from zero).
- Method on
mglGraph
(C++, Python):void
StartGIF (const char *
fname,int
ms=100
) - C function:
void
mgl_start_gif (HMGL
gr,const char *
fname,int
ms) Start writing frames into animated GIF file fname. Parameter ms set the delay between frames in milliseconds. You should not change the picture size during writing the cinema. Use CloseGIF() to finalize writing. Note, that this function is disabled in OpenGL mode.
- Method on
mglGraph
(C++, Python):int
CloseGIF () - C function:
void
mgl_close_gif (HMGL
gr) Finish writing animated GIF and close connected pointers.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |