diff options
| author | NPScript <nathan@reinerweb.ch> | 2022-08-18 17:04:05 +0200 |
|---|---|---|
| committer | NPScript <nathan@reinerweb.ch> | 2022-08-18 17:04:05 +0200 |
| commit | 95361c8c2229840a5e05f49622be629cf654371d (patch) | |
| tree | 280a6d7706b349563959852057e1741f846d5f60 /gragl.h | |
first sketch
Diffstat (limited to 'gragl.h')
| -rw-r--r-- | gragl.h | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +#ifndef GRAGL_H +#define GRAGL_H + +typedef struct { + double x; + double y; +} Point2d; + +typedef struct { + double v; + char valid; +} Scalar; + +typedef struct { + unsigned width; + unsigned height; + Scalar (*func)(double); + unsigned n_func; + double from; + double to; + double step; +} Plot2d; + +typedef struct { + Plot2d * plots; + unsigned n; + unsigned padding; +} Plot2dGroup; + +Plot2dGroup * create_plot2d_group(int num_args, ...); +void free_plot2d_group(Plot2dGroup *); +void plot(Plot2dGroup *); + +#endif |