#include "common.h"#include "memgfx.h"#include "vGfx.h"#include "vGfxPrivate.h"Include dependency graph for vGif.c:

Go to the source code of this file.
Data Structures | |
| struct | memGif |
Functions | |
| void | memGifClose (struct memGif **pG) |
| vGfx * | vgOpenGif (int width, int height, char *fileName) |
Variables | |
| static char const | rcsid [] = "$Id: vGif.c,v 1.4 2003/05/06 07:33:44 kate Exp $" |
| void memGifClose | ( | struct memGif ** | pG | ) |
Definition at line 19 of file vGif.c.
References memGif::fileName, freez(), mgFree(), and mgSaveGif().
Referenced by vgOpenGif().
00021 { 00022 struct memGif *g = *pG; 00023 if (g != NULL) 00024 { 00025 struct memGfx *mg = (struct memGfx *)g; 00026 mgSaveGif(mg, g->fileName); 00027 freez(&g->fileName); 00028 mgFree(&mg); 00029 *pG = NULL; 00030 } 00031 }
Here is the call graph for this function:

Here is the caller graph for this function:

| struct vGfx* vgOpenGif | ( | int | width, | |
| int | height, | |||
| char * | fileName | |||
| ) | [read] |
Definition at line 33 of file vGif.c.
References AllocVar, cloneString(), vGfx::close, vGfx::data, freez(), gif, memGifClose(), mgClearPixels(), mgNew(), vgHalfInit(), and vgMgMethods().
00035 { 00036 struct memGif *gif; 00037 struct memGfx *mg; 00038 struct vGfx *vg; 00039 00040 /* Set up virtual graphics with memory methods. */ 00041 vg = vgHalfInit(width, height); 00042 vgMgMethods(vg); 00043 vg->close = (vg_close)memGifClose; 00044 00045 /* Get our mg + fileName structure. We're forcing 00046 * inheritence from mg essentially. */ 00047 AllocVar(gif); 00048 gif->fileName = cloneString(fileName); 00049 00050 /* Fill in the mg part of this structure with normal memGfx. */ 00051 mg = mgNew(width, height); 00052 mgClearPixels(mg); 00053 gif->mg = *mg; 00054 freez(&mg); /* We don't need this copy any more. */ 00055 00056 vg->data = gif; 00057 return vg; 00058 }
Here is the call graph for this function:

char const rcsid[] = "$Id: vGif.c,v 1.4 2003/05/06 07:33:44 kate Exp $" [static] |
1.5.2