1 /* 2 * Output Device Information 3 * 4 * This file contains definitions for output device interfaces 5 * to the graphing program xgraph. 6 */ 7 8 #include "xgraph.h" 9 10 /* Passed device option flags */ 11 #define D_DOCU 0x01 12 13 /* Returned device capability flags */ 14 #define D_COLOR 0x01 15 16 /* Text justifications */ 17 #define T_CENTER 0 18 #define T_LEFT 1 19 #define T_UPPERLEFT 2 20 #define T_TOP 3 21 #define T_UPPERRIGHT 4 22 #define T_RIGHT 5 23 #define T_LOWERRIGHT 6 24 #define T_BOTTOM 7 25 #define T_LOWERLEFT 8 26 27 /* Text styles */ 28 #define T_AXIS 0 29 #define T_TITLE 1 30 31 /* Line Styles */ 32 #define L_AXIS 0 33 #define L_ZERO 1 34 #define L_VAR 2 35 36 /* Marker Styles */ 37 #define P_PIXEL 0 38 #define P_DOT 1 39 #define P_MARK 2 40 41 /* Output device information returned by initialization routine */ 42 43 typedef struct xg_out { 44 int dev_flags; /* Device characteristic flags */ 45 int area_w, area_h; /* Width and height in pixels */ 46 int bdr_pad; /* Padding from border */ 47 int axis_pad; /* Extra space around axis labels */ 48 int tick_len; /* Length of tick mark on axis */ 49 int legend_pad; /* Top of legend text to legend line */ 50 int axis_width; /* Width of big character of axis font */ 51 int axis_height; /* Height of big character of axis font */ 52 int title_width; /* Width of big character of title font */ 53 int title_height; /* Height of big character of title font */ 54 int max_segs; /* Maximum number of segments in group */ 55 56 void (*xg_text)(); /* Draws text at a location */ 57 void (*xg_seg)(); /* Draws a series of segments */ 58 void (*xg_dot)(); /* Draws a dot or marker at a location */ 59 void (*xg_end)(); /* Stops the drawing sequence */ 60 61 char *user_state; /* User supplied data */ 62 } xgOut; 63 64 #define ERRBUFSIZE 2048 65