Greetings Sindhu
The C signature of the function is:
extern void RIT128x96x4ImageDraw(const unsigned char *pucImage,
unsigned long ulX, unsigned long ulY,
unsigned long ulWidth, unsigned long ulHeight);
The Lua bind to it is:
static int disp_imageDraw(lua_State *L) {
const char *img;
unsigned long x;
unsigned long y;
unsigned long width;
unsigned long height;
img = luaL_checkstring(L, 1);
x = luaL_checkinteger(L, 2);
y = luaL_checkinteger(L, 3);
width = luaL_checkinteger(L, 4);
height = luaL_checkinteger(L, 5);
lm3s_disp_imageDraw(( const unsigned char* )img, x, y, width, height);
return 0;
} That means the Lua function is something like disp.imagedraw(string,number,number,number,number)
So, something like
disp.imagedraw(string.char(15,15,15,15),0,0,2,2) may draw a 4-pixel square (2x2) at coordinate (0,0)
Obs: Here I'm assuming 15 is as the brighter value in the display grayscale.
--Pedro Bittencourt
On Tue, Jun 9, 2009 at 2:44 AM, sai sindhu <
[hidden email]> wrote:
>
> sir,i want a small sample code using RIT128x96x4ImageDraw to display a rectangle.
>
>
> regards
> sindhu
> _______________________________________________
> Elua-dev mailing list
>
[hidden email]>
https://lists.berlios.de/mailman/listinfo/elua-dev>
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev