4 * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 1999, 2000, 2001, 2003 Bernardo Innocenti <bernie@develer.com>
6 * This file is part of DevLib - See devlib/README for information.
9 * \brief Simple charts on top of mware/gfx routines (interface).
12 * \author Bernardo Innocenti <bernie@develer.com>
17 * Revision 1.1 2004/08/04 03:16:30 bernie
18 * Import simple chart drawing code.
21 #ifndef MWARE_CHARTS_H
22 #define MWARE_CHARTS_H
24 #include <gfx.h> /* vcoord_t */
27 * \name Width/height of the chart bitmap in pixels
30 #define BM_WIDTH PRT_HRES
35 * \name Width/height of the small ticks drawn over the axes
38 #define TICKS_HEIGHT 2
43 * \name Chart frame dimensions
46 #define CHART_BORDERTOP 0
47 #define CHART_BORDERBOTTOM TICKS_HEIGHT
48 #define CHART_BORDERLEFT TICKS_WIDTH
49 #define CHART_BORDERRIGHT 0
53 * \name Chart size in pixels
56 #define CHART_WIDTH (BM_WIDTH - CHART_BORDERLEFT - CHART_BORDERRIGHT)
57 #define CHART_HEIGHT (BM_HEIGHT - CHART_BORDERTOP - CHART_BORDERBOTTOM)
61 /* Public function protos */
62 extern BitMap *chart_init(vcoord_t xmin, vcoord_t ymin, float xmax, float ymax);
63 extern void chart_drawAxis(BitMap *bm);
64 extern void chart_drawCurve(BitMap *bm, const vcoord_t *curve_y, int curve_cnt);
65 extern void chart_drawDots(BitMap *bm, const vcoord_t *dotsx, const float *dotsy, int cnt);
67 #endif /* MWARE_CHARTS_H */