26 int arg_count = lua_gettop(L_);
28 const char* t = luaL_checkstring(L_, 1);
32 size = luaL_checkinteger(L_, 2);
34 int sx = tft.textWidth(t);
37 for (
const char* p = t; *p; p++)
41 int sy = lines * tft.fontHeight() * size;
44 lua_pushinteger(L_, sx);
45 lua_setfield(L_, -2,
"x");
47 lua_pushinteger(L_, sy);
48 lua_setfield(L_, -2,
"y");
int DisplayTextSize(lua_State *L_)
Calculate the pixel width and height of a text string on the sprite buffer.
Definition DisplayTextSize.h:24