X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=mware%2Fcharts.h;h=c3c4feef35218b55b46867f70aa6f8331e83eb21;hb=76c53bfa0136be55cf17e57b1ee098e5dfeefa70;hp=e110b2043ac639230e56450d88b4c026083de271;hpb=277b540c0764dd376dcf583acdc97a2b2fd3d8e6;p=bertos.git diff --git a/mware/charts.h b/mware/charts.h index e110b204..c3c4feef 100755 --- a/mware/charts.h +++ b/mware/charts.h @@ -3,7 +3,7 @@ * * * \brief Simple charts on top of mware/gfx routines (interface). @@ -18,8 +18,14 @@ /*#* *#* $Log$ - *#* Revision 1.4 2004/08/25 14:12:09 rasky - *#* Aggiornato il comment block dei log RCS + *#* Revision 1.7 2005/11/04 16:20:02 bernie + *#* Fix reference to README.devlib in header. + *#* + *#* Revision 1.6 2005/04/11 19:10:28 bernie + *#* Include top-level headers from cfg/ subdir. + *#* + *#* Revision 1.5 2004/09/14 20:56:39 bernie + *#* Make more generic and adapt to new gfx functions. *#* *#* Revision 1.3 2004/08/11 19:39:12 bernie *#* Use chart_x_t and chart_y_t for the input dataset. @@ -32,14 +38,14 @@ #define MWARE_CHARTS_H #include /* vcoord_t */ -#include /* CONFIG_ stuff */ +#include /* CONFIG_ stuff */ /*! * \name Width/height of the small ticks drawn over the axes * \{ */ #define TICKS_HEIGHT 2 -#define TICKS_WIDTH 3 +#define TICKS_WIDTH 2 /*\}*/ /*! @@ -47,19 +53,11 @@ * \{ */ #define CHART_BORDERTOP 0 -#define CHART_BORDERBOTTOM TICKS_HEIGHT -#define CHART_BORDERLEFT TICKS_WIDTH +#define CHART_BORDERBOTTOM 0 +#define CHART_BORDERLEFT 0 #define CHART_BORDERRIGHT 0 /*\}*/ -/*! - * \name Chart size in pixels - * \{ - */ -#define CHART_WIDTH (bm->width - CHART_BORDERLEFT - CHART_BORDERRIGHT) -#define CHART_HEIGHT (bm->height - CHART_BORDERTOP - CHART_BORDERBOTTOM) -/*\}*/ - #ifndef CONFIG_CHART_TYPE_X #define CONFIG_CHART_TYPE_X vcoord_t #endif @@ -73,9 +71,10 @@ typedef CONFIG_CHART_TYPE_Y chart_y_t; /* Public function protos */ -extern void chart_init(Bitmap *bm, vcoord_t xmin, vcoord_t ymin, vcoord_t xmax, vcoord_t ymax); -extern void chart_drawAxis(Bitmap *bm); -extern void chart_drawCurve(Bitmap *bm, const chart_y_t *curve_y, int curve_cnt); -extern void chart_drawDots(Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt); +void chart_init(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax); +void chart_setScale(Bitmap *bm, chart_x_t xmin, chart_y_t ymin, chart_x_t xmax, chart_y_t ymax); +void chart_drawAxis(Bitmap *bm); +void chart_drawCurve(Bitmap *bm, const chart_y_t *curve_y, int curve_cnt); +void chart_drawDots(Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt); #endif /* MWARE_CHARTS_H */