diff options
author | Alex Auvolat <alex@adnab.me> | 2017-05-04 11:48:08 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2017-05-04 11:48:08 +0200 |
commit | 9bb1c5371affb2ff0b83256470dec7461b404264 (patch) | |
tree | 9db7cd56713864a07f047572bfa2d55a5a9933dd /src/sysbin/lx/lxdrawlib.c | |
parent | 1161e1d8be014945266017cb0ce735537a287677 (diff) | |
download | kogata-9bb1c5371affb2ff0b83256470dec7461b404264.tar.gz kogata-9bb1c5371affb2ff0b83256470dec7461b404264.zip |
Beginning of tk.lua
Diffstat (limited to 'src/sysbin/lx/lxdrawlib.c')
-rw-r--r-- | src/sysbin/lx/lxdrawlib.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |