B4R Question calling c++ sub with B4R object

Mostez

Well-Known Member
Licensed User
Longtime User
I would like to know how to call c++ sub with B4R object , I want to call drawHLine sub from another c++ sub (draw)
in other words here, how to convert array to B4R object and pass it to drawHLine sub

void draw(){
drawHLine //??
}

B4X:
void drawHLine(B4R::Object* o){
B4R::Array* b = (B4R::Array*)B4R::Object::toPointer(o);
char* c = (char*)b->data;
int x = (c[0]);
int y = (c[1]);
int l = (c[2]);
...
...
}
 
Top