-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGEGLwrapper.cpp
81 lines (68 loc) · 1.67 KB
/
GEGLwrapper.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "GEGLclass.h"
#include "GEGLwrapper.h"
extern "C" {
int printf(const char *format,...);
GEGLclass* newGEGLclass(int argc, char **argv) {
if (argc != 3) {
printf("Error! Insufficient Arguments, please refer to usage below:\n");
printf("Usage: %s <File_input> <File_output>\n", argv[0]);
return NULL;
}
return new GEGLclass(argc, argv);
}
void get_in_out(GEGLclass *g, float **input, float **output) {
if (g == NULL)
return;
g->get_in_out(input, output);
}
GeglBuffer* get_buffer(GEGLclass *g) {
if (g == NULL)
return 0;
return g->get_buffer();
}
int get_x(GEGLclass *g) {
if (g == NULL)
return 0;
return g->get_x();
}
int get_y(GEGLclass *g) {
if (g == NULL)
return 0;
return g->get_y();
}
int get_width(GEGLclass *g) {
if (g == NULL)
return 0;
return g->get_width();
}
int get_height(GEGLclass *g) {
if (g == NULL)
return 0;
return g->get_height();
}
int get_pixelcount(GEGLclass *g) {
if (g == NULL)
return 0;
return g->get_pixelcount();
}
void set_colorformat(GEGLclass *g, const char *string) {
if (g == NULL)
return;
g->set_colorformat(string);
}
void do_operation(GEGLclass *g, const char *string) {
if (g == NULL)
return;
g->do_operation(string);
}
void set_output(GEGLclass *g) {
if (g == NULL)
return;
g->set_output();
}
void deleteGEGLclass(GEGLclass *g) {
if (g == NULL)
return;
delete g;
}
}