aboutsummaryrefslogtreecommitdiff
path: root/gragl.h
diff options
context:
space:
mode:
Diffstat (limited to 'gragl.h')
-rw-r--r--gragl.h34
1 files changed, 34 insertions, 0 deletions
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