home *** CD-ROM | disk | FTP | other *** search
- #define EG_TYPE int
-
- /* header file holding the needed graphics definitions */
- struct plotpos
- {
- EG_TYPE y; /* row coordinate */
- EG_TYPE x; /* col coordinate */
- };
-
- struct definehc
- {
- int color;
- int width;
- };
-
- struct definehs
- {
- int slant;
- char style[5];
- };
-
- struct definekb
- {
- int scan;
- int ext;
- int dir;
- };
-
- struct egstatus
- {
- int mode; /* current graphics mode */
- EG_TYPE x_res; /* horizontal resolution */
- EG_TYPE y_res; /* vertical resolution */
- int avail_colors; /* available colors */
- int world_on; /* world coordinate switch */
- /* 0 - off | 1 - on */
- EG_TYPE w_x0; /* world coordinates */
- EG_TYPE w_y0;
- EG_TYPE w_x1;
- EG_TYPE w_y1;
- EG_TYPE v_x0; /* viewport coordinates */
- EG_TYPE v_y0;
- EG_TYPE v_x1;
- EG_TYPE v_y1;
- int clip_on; /* clipping switch */
- /* 0 - off | 1 - on */
- EG_TYPE clip_x0; /* clipping area */
- EG_TYPE clip_y0;
- EG_TYPE clip_x1;
- EG_TYPE clip_y1;
- int xor_on; /* XORing switch */
- /* 0 - off | 1 - on */
- EG_TYPE line_width; /* current line width */
- unsigned line_style; /* current line style */
- };
-
- typedef struct eggraph
- {
- int graph_type; /* graph type
- 0 - Line graph
- 1 - Scatter graph
- 2 - Hi, low, close graph
- 3 - Bar graph
- 4 - Stacked bar graph */
- int adjust_edges; /* 0 - no adjustments
- 1 - adjust edges so that the data points
- do not lie on the edge, but one
- grid in */
- int title_font; /* font to use for title label */
- char *title_label; /* label for title */
- int title_color; /* color of title */
- int title_loc; /* location of title
- 0 - top
- 1 - bottom
- 2 - left
- 3 - right */
- int title_gap; /* gap in pixels between title and
- rest of the graph */
- int line_graph_type; /* line graph type
- 0 - Line only
- 1 - symbol only
- 2 - Line and symbol */
- int item_color; /* color for lines,bars, etc. */
- EG_TYPE line_width; /* width of lines on graph */
- unsigned line_style; /* style of lines on graph */
- int symbol_color; /* symbol or point color */
- int symbol_fill; /* fill symbol or point color */
- EG_TYPE symbol_size; /* size of symbols
- -1 will auto set it */
- int stack_bars; /* # of bars in a stacked bar */
- char *stack_colors; /* array of colors for the bars in a
- stack */
- int bar_type; /* VERT_BARS or HORZ_BARS */
- EG_TYPE bar_mid_value; /* mid value for horizontal bars */
- int bar_mid_color; /* mid color for horizontal bars */
- EG_TYPE bar_mid_width; /* mid width for horizontal bars */
- int series_bars; /* number of bars to draw in the series */
- int num_series; /* current bar series to draw */
- int frame_type; /* 0 - No frame
- 1 - Half frame
- 2 - Full frame */
- EG_TYPE frame_width; /* width of frame lines */
- unsigned frame_style; /* style of frame lines */
- int frame_color; /* frame color */
- int frame_back; /* frame background color */
- } GRAPH_INFO;
-
- typedef struct eg_axis
- {
- EG_TYPE low,high; /* low and high values */
- EG_TYPE axis_width; /* width of axis line */
- unsigned axis_style; /* style of axis line */
- int axis_color; /* axis color */
- int num_grids; /* number of grid lines */
- int grid_color; /* grid color */
- EG_TYPE grid_width; /* width of grid lines */
- unsigned grid_style; /* style of grid lines */
- int num_ticks; /* number of ticks */
- EG_TYPE tick_size; /* tick_size */
- int tick_gap; /* gap in pixels between ticks and
- labels */
- int tick_color; /* color of tick marks */
- int descrip_font; /* font to use for description label
- along the axis */
- int descrip_color; /* color of description label */
- char *descrip_label; /* description label */
- int axis_font; /* font to use for axis labels */
- int label_type; /* 0 - use numeric labels for the X axis
- 1 - use supplied text labels */
- int num_labels; /* number of text or numeric labels */
- int label_color; /* color of axis labels */
- char **labels; /* array of supplied labels for axis */
- int axis_gap; /* gap in pixels between axis label and
- grid or grid labels */
- } EG_AXIS;
-
-
- #define VERT 800
- #define WORKSIZE 1024
- #define ELIPROWS 800
- #define SMSPOLY 800
-
- /* Defines for EG_GRAPH graph types */
-
- #define LINE_GRAPH 0
- #define SCATTER_GRAPH 1
- #define HI_LOW_GRAPH 2
- #define BAR_GRAPH 3
- #define STACK_BAR_GRAPH 4
- #define USER_GRAPH 5
-
- #define VERT_BARS 1
- #define HORZ_BARS 2
-
- /* Defines for EG_GRAPH line graph types */
-
- #define LINE_ONLY 0
- #define SYMBOL_ONLY 1
- #define LINE_AND_SYMBOL 2
-
- /* grid and frame options for EG_GRAPH */
-
- #define WHOLE_GRAPH 0
- #define DATA_ONLY 1
-
- #define NO_FRAME 0
- #define HALF_FRAME 1
- #define FULL_FRAME 2
-
- /* locations for tiles of 3-D charts and EG_GRAPH */
-
- #define TOP 0
- #define BOTTOM 1
- #define LEFT 2
- #define RIGHT 3
-
- /* Defines for legend funtions */
-
- #define TOP_CENTER 0
- #define TOP_LEFT_HORZ 1
- #define TOP_LEFT_VERT 2
- #define TOP_RIGHT_HORZ 3
- #define TOP_RIGHT_VERT 4
- #define MIDDLE_LEFT 5
- #define MIDDLE_RIGHT 6
- #define BOT_CENTER 7
- #define BOT_LEFT_HORZ 8
- #define BOT_LEFT_VERT 9
- #define BOT_RIGHT_HORZ 10
- #define BOT_RIGHT_VERT 11
-
- /* Defines legend borders */
-
- #define NO_BORDER 0
- #define SINGLE_BORDER 1
- #define DOUBLE_BORDER 2
-
- /* Defines for 3-D pie labels */
-
- #define NO_LABEL 0
- #define OUTSIDE 1
- #define INSIDE_IF_FIT 2
- #define LEGEND_ONLY 3
-
- /* Defines for 3-D bar graph types */
-
- #define BAR 0
- #define PYRAMID 1
- #define OCTAHEDRON 2
- #define STACK_BAR 3
-
- /* locations for labels of 3-D charts */
-
- #define BASE_LEFT 0
- #define BASE_RIGHT 1
- #define XY_PLANE_LEFT 2
- #define XY_PLANE_RIGHT 3
- #define XZ_PLANE 4
- #define YZ_PLANE 5
-
- /* methods for setting XZ and YZ plane labels */
-
- #define AUTO_SET 0
- #define MANUAL_SET 1