summaryrefslogtreecommitdiff
path: root/csrc/graph_struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'csrc/graph_struct.h')
-rw-r--r--csrc/graph_struct.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/csrc/graph_struct.h b/csrc/graph_struct.h
new file mode 100644
index 0000000..4859508
--- /dev/null
+++ b/csrc/graph_struct.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2018 Iru Cai <mytbk920423@gmail.com>
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#include <stdint.h>
+
+struct graph_st
+{
+ int16_t width;
+ int16_t height;
+ int16_t x;
+ int16_t y;
+ int16_t * gdata;
+ int16_t data[0];
+};
+
+struct graph_st * allocate_graph_st(int w, int h, int x, int y);
+struct graph_st * crop_graph(struct graph_st *a1, struct graph_st *a2, int x, int y, int w, int h);