Sistema l'errore da me commesso in fase di conversione...
[bertos.git] / gfx / charts.h
1 /**
2  * \file
3  * <!--
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 README.devlib for information.
7  * -->
8  *
9  * \brief Simple charts on top of mware/gfx routines (interface).
10  *
11  * Configuration:
12  *  - \c CONFIG_CHART_TYPE_X: type for the input dataset of X-coordinates
13  *  - \c CONFIG_CHART_TYPE_Y: type for the input dataset of Y-coordinates
14  *
15  * \version $Id$
16  * \author Bernardo Innocenti <bernie@develer.com>
17  */
18
19 /*#*
20  *#* $Log$
21  *#* Revision 1.5  2006/08/01 12:23:03  bernie
22  *#* Indentation fix.
23  *#*
24  *#* Revision 1.4  2006/07/19 12:56:26  bernie
25  *#* Convert to new Doxygen style.
26  *#*
27  *#* Revision 1.3  2005/11/27 23:36:18  bernie
28  *#* Use appconfig.h instead of cfg/config.h.
29  *#*
30  *#* Revision 1.2  2005/11/04 18:17:45  bernie
31  *#* Fix header guards and includes for new location of gfx module.
32  *#*
33  *#* Revision 1.1  2005/11/04 18:11:35  bernie
34  *#* Move graphics stuff from mware/ to gfx/.
35  *#*
36  *#* Revision 1.7  2005/11/04 16:20:02  bernie
37  *#* Fix reference to README.devlib in header.
38  *#*
39  *#* Revision 1.6  2005/04/11 19:10:28  bernie
40  *#* Include top-level headers from cfg/ subdir.
41  *#*
42  *#* Revision 1.5  2004/09/14 20:56:39  bernie
43  *#* Make more generic and adapt to new gfx functions.
44  *#*
45  *#* Revision 1.3  2004/08/11 19:39:12  bernie
46  *#* Use chart_x_t and chart_y_t for the input dataset.
47  *#*
48  *#* Revision 1.1  2004/08/04 03:16:30  bernie
49  *#* Import simple chart drawing code.
50  *#*
51  *#*/
52 #ifndef GFX_CHARTS_H
53 #define GFX_CHARTS_H
54
55 #include <gfx/gfx.h>   /* vcoord_t */
56 #include <appconfig.h> /* CONFIG_ stuff */
57
58 /**
59  * \name Width/height of the small ticks drawn over the axes
60  * \{
61  */
62 #define TICKS_HEIGHT     2
63 #define TICKS_WIDTH      2
64 /*\}*/
65
66 /**
67  * \name Chart frame dimensions
68  * \{
69  */
70 #define CHART_BORDERTOP       0
71 #define CHART_BORDERBOTTOM    0
72 #define CHART_BORDERLEFT      0
73 #define CHART_BORDERRIGHT     0
74 /*\}*/
75
76 #ifndef CONFIG_CHART_TYPE_X
77 #define CONFIG_CHART_TYPE_X vcoord_t
78 #endif
79 #ifndef CONFIG_CHART_TYPE_Y
80 #define CONFIG_CHART_TYPE_Y vcoord_t
81 #endif
82
83
84 typedef CONFIG_CHART_TYPE_X chart_x_t;
85 typedef CONFIG_CHART_TYPE_Y chart_y_t;
86
87
88 /* Public function protos */
89 void chart_init(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax);
90 void chart_setScale(Bitmap *bm, chart_x_t xmin, chart_y_t ymin, chart_x_t xmax, chart_y_t ymax);
91 void chart_drawAxis(Bitmap *bm);
92 void chart_drawCurve(Bitmap *bm, const chart_y_t *curve_y, int curve_cnt);
93 void chart_drawDots(Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt);
94
95 #endif /* GFX_CHARTS_H */