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

Go to the source code of this file.
Functions | |
| void | vgClose (struct vGfx **pVg) |
| vGfx * | vgHalfInit (int width, int height) |
| int | vgFindRgb (struct vGfx *vg, struct rgbColor *rgb) |
| Color | vgContrastingColor (struct vGfx *vg, int backgroundIx) |
Variables | |
| static char const | rcsid [] = "$Id: vGfx.c,v 1.6 2006/06/23 23:45:02 kent Exp $" |
| void vgClose | ( | struct vGfx ** | pVg | ) |
Definition at line 13 of file vGfx.c.
References vGfx::close, vGfx::data, and freez().
00015 { 00016 struct vGfx *vg = *pVg; 00017 if (vg != NULL) 00018 { 00019 vg->close(&vg->data); 00020 freez(pVg); 00021 } 00022 }
Here is the call graph for this function:

Definition at line 40 of file vGfx.c.
References rgbColor::b, rgbColor::g, MG_BLACK, MG_WHITE, rgbColor::r, and vgColorIxToRgb.
00043 { 00044 struct rgbColor c = vgColorIxToRgb(vg, backgroundIx); 00045 int val = (int)c.r + c.g + c.g + c.b; 00046 if (val > 512) 00047 return MG_BLACK; 00048 else 00049 return MG_WHITE; 00050 }
Definition at line 34 of file vGfx.c.
References rgbColor::b, rgbColor::g, rgbColor::r, and vgFindColorIx.
00036 { 00037 return vgFindColorIx(vg, rgb->r, rgb->g, rgb->b); 00038 }
| struct vGfx* vgHalfInit | ( | int | width, | |
| int | height | |||
| ) | [read] |
Definition at line 24 of file vGfx.c.
References AllocVar, vGfx::height, and vGfx::width.
Referenced by vgOpenGif(), and vgOpenPostScript().
00026 { 00027 struct vGfx *vg; 00028 AllocVar(vg); 00029 vg->width = width; 00030 vg->height = height; 00031 return vg; 00032 }
Here is the caller graph for this function:

char const rcsid[] = "$Id: vGfx.c,v 1.6 2006/06/23 23:45:02 kent Exp $" [static] |
1.5.2