summaryrefslogtreecommitdiff
path: root/meme/marker.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-02-14 03:54:57 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-02-14 03:55:32 (GMT)
commitd5afcf56635da6a906dc7343fed6576720b809ba (patch)
tree7bf699aadec0e766347b175f8dd3510c10c82293 /meme/marker.h
parent72e6384adec350a300e7c508ee027f3ec8b5857c (diff)
downloadmisc-d5afcf56635da6a906dc7343fed6576720b809ba.zip
misc-d5afcf56635da6a906dc7343fed6576720b809ba.tar.gz
misc-d5afcf56635da6a906dc7343fed6576720b809ba.tar.bz2
meme/: add marker system (for documentation); option -m marker.gp to add markers
Diffstat (limited to 'meme/marker.h')
-rw-r--r--meme/marker.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/meme/marker.h b/meme/marker.h
new file mode 100644
index 0000000..4992779
--- /dev/null
+++ b/meme/marker.h
@@ -0,0 +1,36 @@
+/*
+ * marker.h - Markers
+ *
+ * Written 2016 by Werner Almesberger
+ * Copyright 2016 by Werner Almesberger
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+
+#ifndef MARKER_H
+#define MARKER_H
+
+struct mark;
+
+struct marker {
+ const char *name;
+ void (*xform)(float x, float y, float *res_x, float *res_y);
+ struct mark *markers;
+};
+
+
+void marker_draw(const struct marker *marker,
+ void (*line)(void *user, int xa, int ya, int xb, int yb),
+ void (*text)(void *user, int x, int y, float nx, float ny, const char *txt),
+ void *user);
+
+void marker_reload(struct marker *marker);
+
+void marker_load(struct marker *marker, const char *name,
+ void (*xform)(float x, float y, float *res_x, float *res_y));
+
+#endif /* !MARKER_H */