Animation Control
ANIMATION Object
ANIMATION Object/** Animation frame structure. */
typedef struct _ANIMATIONFRAME
{
/** The disposal method (from GIF89a specification):
* Indicates the way in which the graphic is to be treated after being displayed.
* - 0\n No disposal specified. The decoder is not required to take any action.
* - 1\n Do not dispose. The graphic is to be left in place.
* - 2\n Restore to background color. The area used by the frame must be restored to
* the background color.
* - 3\n Restore to previous. The decoder is required to restore the area overwritten by
* the frmae with what was there prior to rendering the frame.
*/
int disposal;
/** The x-coordinate of top-left corner of the frame in whole animation screen. */
int off_x;
/** The y-coordinate of top-left corner of the frame in whole animation screen. */
int off_y;
/** The width of the frame. */
unsigned int width;
/** The height of the frame. */
unsigned int height;
/** The time of the frame will be display, in the unit of animation time_unit. */
unsigned int delay_time;
#ifdef _USE_NEWGAL
/** The memdc compatible with the gif image. */
HDC mem_dc;
/** The bits of the mem_dc, should be freed after deleting the mem_dc. */
Uint8* bits;
#else
/** The bitmap of the frame. */
BITMAP bmp;
#endif
/** The next frame */
struct _ANIMATIONFRAME* next;
/** The previous frame */
struct _ANIMATIONFRAME* prev;
} ANIMATIONFRAME;
/** Animation structure */
typedef struct _ANIMATION
{
/** The width of the animation. */
unsigned int width;
/** The height of the animation. */
unsigned int height;
/** The background color */
RGB bk;
/** The number of all frames. */
int nr_frames;
/**
* The unit of the time will be used count the delay time of every frame.
* The default is 1, equal to 10ms.
*/
int time_unit;
/** Pointer to the animation frame.*/
ANIMATIONFRAME* frames;
} ANIMATION;Styles of Animation Control
Messages of Animation Control
Sample Program

Last updated