charts.h
Go to the documentation of this file.00001
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 #ifndef GFX_CHARTS_H
00078 #define GFX_CHARTS_H
00079
00080 #include <gfx/gfx.h>
00081 #include <appconfig.h>
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
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