From 50be5c9746854adcdb5b45b75955b57f18f98fe5 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 23 Oct 2018 13:07:57 +0800 Subject: *draw->render --- src/lua/modules/graphics/graphics.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lua/modules/graphics/graphics.cpp') 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& tex = proxy->getRef(); - 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& p = proxy->getRef(); - 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(); 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& tex = proxy->getRef(); - 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& p = proxy->getRef(); - 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; } -- cgit v1.1-26-g67d0