#include #define KGFlarge 14 #define KGFgiant 16 #define A4W 595 #define A4H 842 /* public variables */ extern int col[128]; /* color number for default mapped color */ extern int white; /* color number for white */ extern int black; /* color number for black */ extern int red; /* color number for red */ extern int green; /* color number for green */ extern int blue; /* color number for blue */ extern int pwhite; /* color number for pseudo white (black in eps) */ extern int pblack; /* color number for pseudp black (white in eps) */ extern int yellow; /* color number for yellow */ extern int cyan; /* color number for cyan */ extern int magenta; /* color number for magenta */ extern int gray; /* color number for gray */ extern int lgray; /* color number for light gray */ extern int dgray; /* color number for dark gray */ /* image open */ void KGopen(int w,int h,char *colormap,char *output,FILE *fp); /* int w,h ... image width and height */ /* char *colormap ... colormap selecte ("none","color","mono") */ /* char *output ... output format ("gif","eps") */ /* FILE *fp ... pointer for output file */ /* image close */ void KGclose(void); /* colormap setting */ int KGcolormap(int red,int green,int blue); /* int red ... intensity (0-255) */ /* int green ... intensity (0-255) */ /* int blue ... intensity (0-255) */ /* [return] ... allocated number for the color */ /* drawing line */ void KGline(int x0,int y0,int x1,int y1,int color); /* int x0,y0 ... start point */ /* int x1,y1 ... stop point */ /* int color ... color */ /* drawing arc */ void KGarc(int x,int y,int rw,int rh ,int as,int ae,int color); /* int x,y ... center point */ /* int rw,rh ... arc width and height */ /* int as,ae ... start and stop angle */ /* int color ... color */ /* drawing string */ void KGstring(int font,int x,int y,int orig,char *str,int color); /* int font ... font height */ /* int x,y ... drawing position */ /* int orig ... original point of string */ /* char *str ... content of string */ /* int color ... color */ /* Selecting TTF font for PNG */ void KGpngfont(char *str); /* char *str ... Location of TTF font (full path) */ /* drawing box (filled) */ void KGbox(int x0,int y0,int x1,int y1,int color); /* int x0,y0 ... start point */ /* int x1,y1 ... stop point */ /* int color ... color */ /* drawing frame (empty box) */ void KGframe(int x0,int y0,int x1,int y1,int color); /* int x0,y0 ... start point */ /* int x1,y1 ... stop point */ /* int color ... color */