Main Page | Modules | Data Structures | File List | Data Fields

/extra/work/state-dev/src/trends/trd_graph.h

00001 /* ----------------------------------------------------------------------------
00002  * @(#) $Header: /home/systems/jlewalle/dev/jacob-cvs/projects/state/src/trends/trd_graph.h,v 1.4 2003/07/24 16:42:57 jlewalle Exp $
00003  *
00004  * --------------------------------------------------------------------------*/
00005 #if !defined(_INCLUDED_TRD_GRAPH_H_HEADER__)
00006 #define _INCLUDED_TRD_GRAPH_H_HEADER__
00007 
00017 typedef struct trd_state_change_t
00018 {
00019   time_t stamp;
00020   long   state;
00021 } trd_state_change_t;
00022 
00027 typedef struct trd_graph_t
00028 {
00029   apr_pool_t         *pool;
00030   gdImagePtr          image;
00031   trd_color_map_t    *color_map;
00032   char               *title;
00033   char               *title_period;
00034   trd_rectangle_t     canvas;
00035   trd_rectangle_t     pa;
00036   apr_array_header_t *states;
00037   apr_array_header_t *history;
00038   apr_array_header_t *vitals;
00039   time_t              starting_time;
00040   time_t              ending_time;
00041   long                min_y;
00042   long                max_y;
00043 } trd_graph_t;
00044 
00053 trd_graph_t *
00054 trd_graph_create(long width, long height, apr_pool_t *pool);
00055 
00064 sos_status_t *
00065 trd_graph_status_find(trd_graph_t *graph, sul_key_t id);
00066 
00075 void
00076 trd_graph_render_basics(trd_graph_t *graph);
00077 
00084 void
00085 trd_graph_render_title(trd_graph_t *graph);
00086 
00093 void
00094 trd_graph_write(trd_graph_t *graph, char *file);
00095 
00104 long
00105 trd_graph_transform_x(trd_graph_t *graph, time_t x);
00106 
00115 long
00116 trd_graph_transform_y(trd_graph_t *graph, float y);
00117 
00124 void
00125 trd_graph_render_legend(trd_graph_t *graph);
00126 
00134 void
00135 trd_graph_render_grid(trd_graph_t *graph, short x, short y);
00136 
00142 void
00143 trd_graph_render_axii(trd_graph_t *graph);
00144 
00147 #endif

Generated on Wed Apr 28 09:38:36 2004 for State by doxygen 1.3.5