aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_graphics.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-05-30 20:42:17 +0800
committerchai <chaifix@163.com>2018-05-30 20:42:17 +0800
commit2700c776f033968a0ce139db4fdb307e9d993225 (patch)
treee1909d0a2c5e3c5bd9490bf47117c99596c06182 /src/lua/graphics/luaopen_graphics.cpp
parent5298bdefd7f7875ae8b7cb6c9201e3321af62011 (diff)
工厂
Diffstat (limited to 'src/lua/graphics/luaopen_graphics.cpp')
-rw-r--r--src/lua/graphics/luaopen_graphics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp
index 0d06aca..7db43c5 100644
--- a/src/lua/graphics/luaopen_graphics.cpp
+++ b/src/lua/graphics/luaopen_graphics.cpp
@@ -84,7 +84,7 @@ namespace lua
{
Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_JSL, sizeof(Proxy));
const char* program = luax_checkstring(L, 1);
- JSLProgram* jsl = new JSLProgram(program);
+ JSLProgram* jsl = JSLProgram::createJSLProgram(program);
proxy->bind(jsl);
return 1;
}
@@ -98,7 +98,7 @@ namespace lua
int w = luax_checknumber(L, 1);
int h = luax_checknumber(L, 2);
Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_CANVAS, sizeof(Proxy));
- Canvas* cvs = new Canvas(w, h);
+ Canvas* cvs = Canvas::createCanvas(w, h);
proxy->bind(cvs);
return 1;
}