charts.h
Go to the documentation of this file.00001
00044 #ifndef GFX_CHARTS_H
00045 #define GFX_CHARTS_H
00046
00047 #include "cfg/cfg_gfx.h"
00048
00049 #include <gfx/gfx.h>
00050
00055 #define TICKS_HEIGHT 2
00056 #define TICKS_WIDTH 2
00057
00058
00063 #define CHART_BORDERTOP 0
00064 #define CHART_BORDERBOTTOM 0
00065 #define CHART_BORDERLEFT 0
00066 #define CHART_BORDERRIGHT 0
00067
00068
00069 #ifndef CONFIG_CHART_TYPE_X
00070 #define CONFIG_CHART_TYPE_X vcoord_t
00071 #endif
00072 #ifndef CONFIG_CHART_TYPE_Y
00073 #define CONFIG_CHART_TYPE_Y vcoord_t
00074 #endif
00075
00076
00077 typedef CONFIG_CHART_TYPE_X chart_x_t;
00078 typedef CONFIG_CHART_TYPE_Y chart_y_t;
00079
00080
00081
00082 void chart_init(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax);
00083 void chart_setScale(Bitmap *bm, chart_x_t xmin, chart_y_t ymin, chart_x_t xmax, chart_y_t ymax);
00084 void chart_drawAxis(Bitmap *bm);
00085 void chart_drawCurve(Bitmap *bm, const chart_y_t *curve_y, int curve_cnt);
00086 void chart_drawDots(Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt);
00087
00088 #endif