// virtual graphics and drawing // routines to manage display of a UI typedef unsigned long vcolor; // holds YUVA typedef struct vgraph { vcliprect *cr; int scalexs; int scalexe; int scaleys; int scaleye; unsigned int backcolor; unsigned int pencolor; vfont *font; // i just release the one I have when I change fonts... maybe even use a central fontlibrary :) } vgraph; int vgraph_setcanvas( vgraph *graph, vimage *image ); int vgraph_setviewscale( vgraph *graph, int xs,int ys, int xe,int ye ); int vgraph_setbackcolor( vgraph *graph, vcolor backcolor ); int vgraph_setpencolor( vgraph *graph, vcolor pencolor ); int vgraph_setpenthick( vgraph *graph, int penthick ); int vgraph_setfont( vgraph *graph, char *fontname, int fontsize, int fontattributes); int vgraph_drawclear( vgraph *graph ); int vgraph_drawpoint( vgraph *graph, int x, int y ); int vgraph_drawline( vgraph *graph, int x, int y, int w,int h ); int vgraph_drawbox( vgraph *graph, int x, int y, int w,int h ); int vgraph_drawrect( vgraph *graph, int x, int y, int w,int h ); int vgraph_drawcircle( vgraph *graph, int x, int y, int radius ); int vgraph_drawellipse( vgraph *graph, int x, int y, int rx,int ry ); int vgraph_drawtext( vgraph *graph, int x, int y, char *text );