Thanks tigrot!
but maybe my question is not clear, I understand the RunNative command, but for some reason I have to call it inside the inline C code, mean that I need the c syntax to call the drawRect function.
Hope that you understand what I mean. (It’s a bit difficult for me to write in English....)
Thanks!
Example:
B4X:
B4R:
RunNative ("drawAll",Null)
Inline C Code:
void drawRect(B4R::Object* o)
{
B4R::B4RAdafruitGFX* bgfx = (B4R::B4RAdafruitGFX*)o->data.PointerField;
bgfx->gfx->drawRect(b4r_main::_cx, b4r_main::_cy, b4r_main::_cw, b4r_main::_ch, b4r_main::_ccolor);
}
void drawAll(B4R::Object* o)
{
drawRect (null); ??? <-- I need to correct syntax
drawCircle(null); ???
drawLine(null); ???
}
- I find a code in C can extract the pixel information from a 12x12 Chinese Font file
- I have to pass those info to GFX and use the drawPixel / drawRect command to plot the character to the LCD screen
I think it should have some better / direct method for the solution, but it's more easy for me to use the "Call" function.
(as I can't read/write C code, it's the most easy way for me...)