charts.h

Go to the documentation of this file.
00001 
00055 #ifndef GFX_CHARTS_H
00056 #define GFX_CHARTS_H
00057 
00058 #include "cfg/cfg_gfx.h" /* CONFIG_ stuff */
00059 
00060 #include <gfx/gfx.h>   /* vcoord_t */
00061 
00066 #define TICKS_HEIGHT     2
00067 #define TICKS_WIDTH      2
00068 /*\}*/
00069 
00074 #define CHART_BORDERTOP       0
00075 #define CHART_BORDERBOTTOM    0
00076 #define CHART_BORDERLEFT      0
00077 #define CHART_BORDERRIGHT     0
00078 /*\}*/
00079 
00080 #ifndef CONFIG_CHART_TYPE_X
00081 #define CONFIG_CHART_TYPE_X vcoord_t
00082 #endif
00083 #ifndef CONFIG_CHART_TYPE_Y
00084 #define CONFIG_CHART_TYPE_Y vcoord_t
00085 #endif
00086 
00087 
00088 typedef CONFIG_CHART_TYPE_X chart_x_t;
00089 typedef CONFIG_CHART_TYPE_Y chart_y_t;
00090 
00091 
00092 /* Public function protos */
00093 void chart_init(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax);
00094 void chart_setScale(Bitmap *bm, chart_x_t xmin, chart_y_t ymin, chart_x_t xmax, chart_y_t ymax);
00095 void chart_drawAxis(Bitmap *bm);
00096 void chart_drawCurve(Bitmap *bm, const chart_y_t *curve_y, int curve_cnt);
00097 void chart_drawDots(Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt);
00098 
00099 #endif /* GFX_CHARTS_H */