| [ < ] | [ > ] | [ << ] | [ 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):intNewFrame () - C function:
intmgl_new_frame (HMGLgr) 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):voidEndFrame () - C function:
voidmgl_end_frame (HMGLgr) Finishes the frame drawing.
- Method on
mglGraph(C++, Python):intGetNumFrame () - C function:
intmgl_get_num_frame (HMGLgr) Gets the number of created frames.
- Method on
mglGraph(C++, Python):voidResetFrames () - C function:
intmgl_reset_frames (HMGLgr) Reset frames counter (start it from zero).
- Method on
mglGraph(C++, Python):voidStartGIF (const char *fname,intms=100) - C function:
voidmgl_start_gif (HMGLgr,const char *fname,intms) 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):intCloseGIF () - C function:
voidmgl_close_gif (HMGLgr) Finish writing animated GIF and close connected pointers.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
