3 public class VCodeGen : Library{
5 static bool loaded =
false;
10 String module_name =
"xcimg.dll";
12 module_name = (
"xcimg.so");
15 module_name = (
"xcimg.dylib");
17 loadLibrary(module_name);
27 Pointer cdecl alloc_vcode(
String text,
int length,
int height);
28 int cdecl get_buffer_req(Pointer img);
29 int cdecl get_data(Pointer img, ObjectPtr,
int length);
30 void cdecl delloc_vcode(Pointer img);
33 public VCodeGen(
String text,
int length,
int height){
35 nativehandle = alloc_vcode(text, length, height);
43 delloc_vcode(nativehandle);
46 public byte[] getData(){
47 int length = get_buffer_req(nativehandle);
48 byte[] data =
new byte[length];
49 get_data(nativehandle, data, length);
54 return get_buffer_req(nativehandle);