diff options
author | chai <chaifix@163.com> | 2018-08-17 00:15:05 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-17 00:15:05 +0800 |
commit | 952748a86c4ddf1d7e47b358a64904c35bacd4aa (patch) | |
tree | 2b65d1021a5b62beac5ac6b229b43856eaec29e9 /src/lua/graphics/luaopen_Image.cpp | |
parent | 7f7f6b3f19703eaeaad3801e47749e0173faa2fc (diff) |
*update
Diffstat (limited to 'src/lua/graphics/luaopen_Image.cpp')
-rw-r--r-- | src/lua/graphics/luaopen_Image.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/graphics/luaopen_Image.cpp b/src/lua/graphics/luaopen_Image.cpp index b1672d5..47cb4c6 100644 --- a/src/lua/graphics/luaopen_Image.cpp +++ b/src/lua/graphics/luaopen_Image.cpp @@ -20,14 +20,14 @@ namespace lua static int l_getWidth(lua_State* L) { Ref<Image>& ref = checkImage(L); - luax_pushnumber(L, (*ref).getWidth()); + luax_pushnumber(L, ref->getWidth()); return 1; } static int l_getHeight(lua_State *L) { Ref<Image>& ref = checkImage(L); - luax_pushnumber(L, (*ref).getHeight()); + luax_pushnumber(L, ref->getHeight()); return 1; } @@ -36,7 +36,7 @@ namespace lua Ref<Image>& ref = checkImage(L); int x = luax_checknumber(L, 2); int y = luax_checknumber(L, 3); - color c = (*ref).getPixel(x, y); + color c = ref->getPixel(x, y); luax_pushnumber(L, c.rgba.r); luax_pushnumber(L, c.rgba.g); luax_pushnumber(L, c.rgba.b); @@ -49,15 +49,15 @@ namespace lua Ref<Image>& ref = checkImage(L); int x = luax_checknumber(L, 2); int y = luax_checknumber(L, 3); - (*ref).setAnchor(x, y); + ref->setAnchor(x, y); return 0; } static int l_getSize(lua_State* L) { Ref<Image>& ref = checkImage(L); - luax_pushnumber(L, (*ref).getWidth()); - luax_pushnumber(L, (*ref).getHeight()); + luax_pushnumber(L, ref->getWidth()); + luax_pushnumber(L, ref->getHeight()); return 2; } |