charts.c File Reference

Simple charts on top of mware/gfx routines (implementation). More...

#include "charts.h"
#include <gfx/gfx.h>

Go to the source code of this file.


Functions

void chart_drawAxis (Bitmap *bm)
 Draw the chart axes.
void chart_drawCurve (Bitmap *bm, const chart_y_t *curve_y, int curve_cnt)
 Draw a set of curve_cnt connected segments, whose Y coordinates are identified by the curve_y array and X-coordinates are are evenly spaced by one virtual unit.
void chart_drawDots (Bitmap *bm, const chart_x_t *dots_x, const chart_y_t *dots_y, int cnt)
 Disegna dei dot in corrispondenza delle coppie (dotsx[i];dotsy[i]) Se dotsx e' NULL, i punti vengono disegnati ad intervalli regolari.

Detailed Description

Simple charts on top of mware/gfx routines (implementation).

Version:
Id
charts.c 2506 2009-04-15 08:29:07Z duplo
Author:
Bernie Innocenti <bernie@codewiz.org>
Sample usage:

    bm = chart_init(0, ymax, N_POINTS_CURVE, ymin);

    chart_drawCurve(bm, curve_y, curve_points + 1);
    gfx_setViewRect(bm, xmin, ymax, xmax, ymin);
    chart_drawDots(bm, samples_x, samples_y, samples_cnt);

    print_bitmap(bm);

Definition in file charts.c.