summaryrefslogtreecommitdiff
path: root/csrc/graph_struct.h
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-01 21:19:44 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-01 21:21:22 +0800
commit63d7007905047e5f488e179a56d861dfaa17aa90 (patch)
treef4ac20cc473dad515d8ac984fc5fa20d213a4975 /csrc/graph_struct.h
parent7e03990c30672179e4b7cc39b8b286ab8987e0d0 (diff)
downloadrich4-63d7007905047e5f488e179a56d861dfaa17aa90.tar.xz
data_struct -> graph_struct
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);