From 9bb1c5371affb2ff0b83256470dec7461b404264 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 4 May 2017 11:48:08 +0200 Subject: Beginning of tk.lua --- src/sysbin/lx/lxdrawlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sysbin/lx') diff --git a/src/sysbin/lx/lxdrawlib.c b/src/sysbin/lx/lxdrawlib.c index 22c6a3b..1a24fcb 100644 --- a/src/sysbin/lx/lxdrawlib.c +++ b/src/sysbin/lx/lxdrawlib.c @@ -90,16 +90,18 @@ static int font_gc(lua_State *L) { static int font_text_width(lua_State *L) { drawlib_font *f = (drawlib_font*)luaL_checkudata(L, 1, FONT); const char* txt = luaL_checkstring(L, 2); + int size = luaL_checkinteger(L, 3); - lua_pushinteger(L, g_text_width(f->font, txt)); + lua_pushinteger(L, g_text_width(f->font, txt, size)); return 1; } static int font_text_height(lua_State *L) { drawlib_font *f = (drawlib_font*)luaL_checkudata(L, 1, FONT); const char* txt = luaL_checkstring(L, 2); + int size = luaL_checkinteger(L, 3); - lua_pushinteger(L, g_text_height(f->font, txt)); + lua_pushinteger(L, g_text_height(f->font, txt, size)); return 1; } -- cgit v1.2.3