diff options
author | chai <chaifix@163.com> | 2018-10-23 13:07:57 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-23 13:07:57 +0800 |
commit | 50be5c9746854adcdb5b45b75955b57f18f98fe5 (patch) | |
tree | ca854633b3901f6f052e757ca2a98ad0c597a508 /src/lua/modules/graphics/graphics.cpp | |
parent | 233856869a699c0139291e4f43a61bc5a056c189 (diff) |
*draw->render
Diffstat (limited to 'src/lua/modules/graphics/graphics.cpp')
-rw-r--r-- | src/lua/modules/graphics/graphics.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lua/modules/graphics/graphics.cpp b/src/lua/modules/graphics/graphics.cpp index 8b2d7cd..f98d640 100644 --- a/src/lua/modules/graphics/graphics.cpp +++ b/src/lua/modules/graphics/graphics.cpp @@ -276,7 +276,7 @@ namespace JinEngine float oy = luax_optnumber(L, 8, 0); Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Texture>& tex = proxy->getRef<Texture>(); - tex->draw(x, y, sx, sy, r, ox, oy); + tex->render(x, y, sx, sy, r, ox, oy); } static void l_draw_canvas(lua_State* L) @@ -292,7 +292,7 @@ namespace JinEngine float oy = luax_optnumber(L, 8, 0); Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Canvas>& p = proxy->getRef<Canvas>(); - p->draw(x, y, sx, sy, r, ox, oy); + p->render(x, y, sx, sy, r, ox, oy); } /* jin.graphics.draw(text, font, x, y) */ @@ -322,7 +322,7 @@ namespace JinEngine font = context.defaultFont; } int lineheight = luax_optnumber(L, 5, font->getFontSize()); - font->print(*text, x, y, lineheight, spacing); + font->render(*text, x, y, lineheight, spacing); } /* jin.graphics.draw(page, x, y) */ @@ -335,7 +335,7 @@ namespace JinEngine Proxy* p = (Proxy*)luax_toudata(L, 1); Page* page = p->getObject<Page>(); Font* font = page->font; - font->print(page, x, y); + font->render(page, x, y); } static int l_draw(lua_State* L) @@ -382,13 +382,13 @@ namespace JinEngine { Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Texture>& tex = proxy->getRef<Texture>(); - tex->draw(q, x, y, sx, sy, r, ox, oy); + tex->render(q, x, y, sx, sy, r, ox, oy); } else if (luax_istype(L, 1, JIN_GRAPHICS_CANVAS)) { Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Canvas>& p = proxy->getRef<Canvas>(); - p->draw(q, x, y, sx, sy, r, ox, oy); + p->render(q, x, y, sx, sy, r, ox, oy); } else { @@ -410,7 +410,7 @@ namespace JinEngine int y = luax_optnumber(L, 3, 0); int lineheight = luax_optnumber(L, 4, font->getFontSize()); int spacing = luax_optnumber(L, 5, 0); - font->print(text, x, y, lineheight, spacing); + font->render(text, x, y, lineheight, spacing); return 0; } |