From 95361c8c2229840a5e05f49622be629cf654371d Mon Sep 17 00:00:00 2001 From: NPScript Date: Thu, 18 Aug 2022 17:04:05 +0200 Subject: first sketch --- gragl.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gragl.h (limited to 'gragl.h') diff --git a/gragl.h b/gragl.h new file mode 100644 index 0000000..6c6c8a7 --- /dev/null +++ b/gragl.h @@ -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 -- cgit v1.2.3-70-g09d2