-
Notifications
You must be signed in to change notification settings - Fork 3
/
buffer.cpp
123 lines (93 loc) · 3.33 KB
/
buffer.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#include "sap.h"
#include "buffer.h"
// SapBuffer_New creates a new SapBufferWrapper
SapBufferWrapper SapBuffer_New() {
return new SapBuffer();
}
SapBufferWrapper SapBuffer_NewForAcquisition(int count, SapAcquisitionWrapper src) {
return new SapBuffer(count, src);
}
SapBufferWrapper SapBuffer_NewWithSize(int count, int width, int height, int format) {
return new SapBuffer(count, width, height, format, SapBuffer::TypeContiguous);
}
void SapBuffer_Delete(SapBufferWrapper buf){
delete buf;
}
bool SapBuffer_Create(SapBufferWrapper buf) {
return buf->Create();
}
bool SapBuffer_Destroy(SapBufferWrapper buf) {
return buf->Destroy();
}
bool SapBuffer_SetParameter(SapBufferWrapper buf, int param, int val) {
return buf->SetParameter(param, val);
}
bool SapBuffer_GetParameterInt32(SapBufferWrapper buf, int param, int *val) {
return buf->GetParameter(param, val);
}
bool SapBuffer_GetParameterInt64(SapBufferWrapper buf, int param, long *val) {
return buf->GetParameter(param, val);
}
void SapBuffer_SetHeight(SapBufferWrapper buf, int height) {
buf->SetHeight(height);
}
int SapBuffer_GetHeight(SapBufferWrapper buf) {
return buf->GetHeight();
}
void SapBuffer_SetWidth(SapBufferWrapper buf, int width) {
buf->SetWidth(width);
}
int SapBuffer_GetWidth(SapBufferWrapper buf) {
return buf->GetWidth();
}
void SapBuffer_SetFormat(SapBufferWrapper buf, int format) {
buf->SetFormat(format);
}
void SapBuffer_SetPixelDepth(SapBufferWrapper buf, int depth) {
buf->SetPixelDepth(depth);
}
int SapBuffer_GetPixelDepth(SapBufferWrapper buf) {
return buf->GetPixelDepth();
}
void SapBuffer_SetSrcNode(SapBufferWrapper buf, SapAcquisitionWrapper acq) {
buf->SetSrcNode(acq);
}
void SapBuffer_ClearSrcNode(SapBufferWrapper buf) {
buf->SetSrcNode(NULL);
}
bool SapBuffer_ReadLine(SapBufferWrapper buf, int x1, int y1, int x2, int y2, void* data, int* count) {
return buf->ReadLine(x1, y1, x2, y2, data, count);
}
bool SapBuffer_ReadLineWithIndex(SapBufferWrapper buf, int index, int x1, int y1, int x2, int y2, void* data, int* count) {
return buf->ReadLine(index, x1, y1, x2, y2, data, count);
}
bool SapBuffer_Copy(SapBufferWrapper buf, SapBufferWrapper pSrc) {
return buf->Copy(pSrc);
}
bool SapBuffer_CopyWithIndex(SapBufferWrapper buf, SapBufferWrapper pSrc, int srcIndex, int dstIndex) {
return buf->Copy(pSrc, srcIndex, dstIndex);
}
bool SapBuffer_CopyRect(SapBufferWrapper buf, SapBufferWrapper pSrc, int srcIndex, int xSrc, int ySrc, int width, int height, int dstIndex, int xDest, int yDest) {
return buf->CopyRect(pSrc, srcIndex, xSrc, ySrc, width, height, dstIndex, xDest, yDest);
}
bool SapBuffer_CopyAll(SapBufferWrapper buf, SapBufferWrapper pSrc) {
return buf->CopyAll(pSrc);
}
bool SapBuffer_Save(SapBufferWrapper buf, const char* fileName, const char* options) {
return buf->Save(fileName, options);
}
bool SapBuffer_SaveForIndex(SapBufferWrapper buf, const char* fileName, const char* options, int index) {
return buf->Save(fileName, options, index);
}
const char* SapBuffer_GetLastStatus(SapBufferWrapper buf) {
return buf->GetLastStatus();
}
int SapBuffer_GetIndex(SapBufferWrapper buf) {
return buf->GetIndex();
}
void SapBuffer_SetIndex(SapBufferWrapper buf, int index) {
buf->SetIndex(index);
}
void SapBuffer_Next(SapBufferWrapper buf) {
buf->Next();
}