aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_ttf.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-12-04 10:13:03 +0800
committerchai <chaifix@163.com>2018-12-04 10:13:03 +0800
commit8cd03a53878b9d67eb4b13fb546dbd989d8217e2 (patch)
treed27371aa2d702705dd86d3c2d8a6c4bd8bd7ec96 /src/lua/modules/graphics/je_lua_ttf.cpp
parent7c0da0c1181ecf333aa784d4cce09bc160dfe908 (diff)
*proxy->lua object
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_ttf.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf.cpp b/src/lua/modules/graphics/je_lua_ttf.cpp
index c3d9aae..df0379e 100644
--- a/src/lua/modules/graphics/je_lua_ttf.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf.cpp
@@ -1,4 +1,4 @@
-#include "common/je_lua_proxy.h"
+#include "common/je_lua_object.h"
#include "common/je_lua_common.h"
#include "libjin/jin.h"
@@ -17,15 +17,15 @@ namespace JinEngine
LUA_IMPLEMENT int l_gc(lua_State* L)
{
- Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_TTF);
- proxy->release();
+ LuaObject* luaObj = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTF);
+ luaObj->release();
return 0;
}
/* typeset(Text | string, lineheight, spacing) */
LUA_IMPLEMENT int l_typeset(lua_State* L)
{
- Proxy* pxyTTF = (Proxy*)luax_checktype(L, 1, Jin_Lua_TTF);
+ LuaObject* pxyTTF = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTF);
Shared<TTF>& shrTTF = pxyTTF->getShared<TTF>();
TTF* ttf = pxyTTF->getObject<TTF>();
int lineheight = luax_optnumber(L, 3, ttf->getFontSize());
@@ -40,13 +40,13 @@ namespace JinEngine
}
else if (luax_istype(L, 2, Jin_Lua_Text))
{
- Proxy* pxyText = (Proxy*)luax_checktype(L, 2, Jin_Lua_Text);
+ LuaObject* pxyText = (LuaObject*)luax_checktype(L, 2, Jin_Lua_Text);
Text* text = pxyText->getObject<Text>();
page = ttf->typeset(*text, lineheight, spacing);
}
Shared<Page>* refPage = new Shared<Page>(L, page, Jin_Lua_Page);
refPage->setDependency((int)PageDependency::DEP_TTF, &shrTTF);
- Proxy* pxyPage = luax_newinstance(L, Jin_Lua_Page, refPage);
+ LuaObject* pxyPage = luax_newinstance(L, Jin_Lua_Page, refPage);
return 1;
}