charts.h

Go to the documentation of this file.
00001 
00044 /*#*
00045  *#* $Log$
00046  *#* Revision 1.5  2006/08/01 12:23:03  bernie
00047  *#* Indentation fix.
00048  *#*
00049  *#* Revision 1.4  2006/07/19 12:56:26  bernie
00050  *#* Convert to new Doxygen style.
00051  *#*
00052  *#* Revision 1.3  2005/11/27 23:36:18  bernie
00053  *#* Use appconfig.h instead of cfg/config.h.
00054  *#*
00055  *#* Revision 1.2  2005/11/04 18:17:45  bernie
00056  *#* Fix header guards and includes for new location of gfx module.
00057  *#*
00058  *#* Revision 1.1  2005/11/04 18:11:35  bernie
00059  *#* Move graphics stuff from mware/ to gfx/.
00060  *#*
00061  *#* Revision 1.7  2005/11/04 16:20:02  bernie
00062  *#* Fix reference to README.devlib in header.
00063  *#*
00064  *#* Revision 1.6  2005/04/11 19:10:28  bernie
00065  *#* Include top-level headers from cfg/ subdir.
00066  *#*
00067  *#* Revision 1.5  2004/09/14 20:56:39  bernie
00068  *#* Make more generic and adapt to new gfx functions.
00069  *#*
00070  *#* Revision 1.3  2004/08/11 19:39:12  bernie
00071  *#* Use chart_x_t and chart_y_t for the input dataset.
00072  *#*
00073  *#* Revision 1.1  2004/08/04 03:16:30  bernie
00074  *#* Import simple chart drawing code.
00075  *#*
00076  *#*/
00077 #ifndef GFX_CHARTS_H
00078 #define GFX_CHARTS_H
00079 
00080 #include <gfx/gfx.h>   /* vcoord_t */
00081 #include <appconfig.h> /* CONFIG_ stuff */
00082 
00087 #define TICKS_HEIGHT     2
00088 #define TICKS_WIDTH      2
00089 /*\}*/
00090 
00095 #define CHART_BORDERTOP       0
00096 #define CHART_BORDERBOTTOM    0
00097 #define CHART_BORDERLEFT      0
00098 #define CHART_BORDERRIGHT     0
00099 /*\}*/
00100 
00101 #ifndef CONFIG_CHART_TYPE_X
00102 #define CONFIG_CHART_TYPE_X vcoord_t
00103 #endif
00104 #ifndef CONFIG_CHART_TYPE_Y
00105 #define CONFIG_CHART_TYPE_Y vcoord_t
00106 #endif
00107 
00108 
00109 typedef CONFIG_CHART_TYPE_X chart_x_t;
00110 typedef CONFIG_CHART_TYPE_Y chart_y_t;
00111 
00112 
00113 /* Public function protos */
00114 void chart_init(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax);
00115 void chart_setScale(Bitmap *bm, chart_x_t xmin, chart_y_t ymin, chart_x_t xmax, chart_y_t ymax);
00116 void chart_drawAxis(Bitmap *bm);
00117 void chart_drawCurve(Bitmap *bm, const chart_y_t *curve_y, int curve_cnt);
00118 void chart_drawDots(Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt);
00119 
00120 #endif /* GFX_CHARTS_H */