diff options
author | chai <chaifix@163.com> | 2018-11-13 21:33:25 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-13 21:33:25 +0800 |
commit | d2058dce75ceb67f27c50e9f27d755a4d30c9003 (patch) | |
tree | 7575e4b15b637511705632c276f244159841e375 /src/lua/modules/graphics/je_lua_ttf.cpp | |
parent | 75792c15480d3d99b2ba7e79e143e4b569b22611 (diff) |
*修改渲染模块
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_ttf.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf.cpp b/src/lua/modules/graphics/je_lua_ttf.cpp index 4e47906..31af310 100644 --- a/src/lua/modules/graphics/je_lua_ttf.cpp +++ b/src/lua/modules/graphics/je_lua_ttf.cpp @@ -2,6 +2,7 @@ #include "lua/modules/types.h" #include "lua/common/je_lua_common.h" #include "libjin/jin.h" +#include "je_lua_ttf.h" using namespace JinEngine::Graphics; using namespace JinEngine::Graphics::Fonts; @@ -11,6 +12,28 @@ namespace JinEngine namespace Lua { + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + // TTFData + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + + TTF* TTFData::createTTF(unsigned fontSize) + { + TTF* ttf; + try + { + ttf = new TTF(this, fontSize); + } + catch (...) + { + return nullptr; + } + return ttf; + } + + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + // TTF + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + LUA_IMPLEMENT int l_gc(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_TTF); |