| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.5.2 Frames/Animation
These functions provide ability to create several pictures simultaneously. For most of cases it is useless but for widget classes (see Widget classes) they can provide a way to show animation. Also you can write several frames into animated GIF file.
- Method on
mglGraph:voidNewFrame () - C function:
voidmgl_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:voidEndFrame () - C function:
voidmgl_end_frame (HMGLgr) Finishes the frame drawing.
- Method on
mglGraph:intGetNumFrame () - C function:
intmgl_get_num_frame (HMGLgr) Gets the number of created frames.
- Method on
mglGraph:voidSetFrame (inti) - C function:
voidmgl_set_frame (HMGLgr,inti) Finishes the frame drawing and sets drawing data to frame i, which should be in range [0,
GetNumFrame()-1]. This function is similar toEndFrame()but don’t add frame to the GIF image.
- Method on
mglGraph:voidGetFrame (inti) - C function:
voidmgl_get_frame (HMGLgr,inti) Replaces drawing data by one from frame i. Function work if
MGL_VECT_FRAMEis set on (by default).
- Method on
mglGraph:voidShowFrame (inti) - C function:
voidmgl_show_frame (HMGLgr,inti) Appends drawing data from frame i to current one. Function work if
MGL_VECT_FRAMEis set on (by default).
- Method on
mglGraph:voidDelFrame (inti) - C function:
voidmgl_del_frame (HMGLgr,inti) Deletes drawing data for frame i and shift all later frame indexes. Function work if
MGL_VECT_FRAMEis set on (by default). Do nothing in OpenGL mode.
- Method on
mglGraph:voidResetFrames () - C function:
voidmgl_reset_frames (HMGLgr) Reset frames counter (start it from zero).
- Method on
mglGraph: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:voidCloseGIF () - C function:
voidmgl_close_gif (HMGLgr) Finish writing animated GIF and close connected pointers.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
