aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_Image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/graphics/luaopen_Image.cpp')
-rw-r--r--src/lua/graphics/luaopen_Image.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lua/graphics/luaopen_Image.cpp b/src/lua/graphics/luaopen_Image.cpp
index c5648a5..d651e20 100644
--- a/src/lua/graphics/luaopen_Image.cpp
+++ b/src/lua/graphics/luaopen_Image.cpp
@@ -9,31 +9,31 @@ namespace jin
namespace lua
{
- static inline Image* checkImage(lua_State* L)
+ static inline Texture* checkTexture(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_checktype(L, 1, TYPE_IMAGE);
if (proxy != 0 && proxy != nullptr)
- return (Image*)proxy->object;
+ return (Texture*)proxy->object;
return nullptr;
}
static int l_getWidth(lua_State* L)
{
- Image* i = checkImage(L);
+ Texture* i = checkTexture(L);
luax_pushnumber(L, i->getWidth());
return 1;
}
static int l_getHeight(lua_State *L)
{
- Image* i = checkImage(L);
+ Texture* i = checkTexture(L);
luax_pushnumber(L, i->getHeight());
return 1;
}
static int l_getPixel(lua_State* L)
{
- Image* i = checkImage(L);
+ Texture* i = checkTexture(L);
int x = luax_checknumber(L, 2);
int y = luax_checknumber(L, 3);
color c = i->getPixel(x, y);
@@ -46,7 +46,7 @@ namespace lua
static int l_setAnchor(lua_State* L)
{
- Image* i = checkImage(L);
+ Texture* i = checkTexture(L);
int x = luax_checknumber(L, 2);
int y = luax_checknumber(L, 3);
i->setAnchor(x, y);
@@ -55,7 +55,7 @@ namespace lua
static int l_getSize(lua_State* L)
{
- Image* i = checkImage(L);
+ Texture* i = checkTexture(L);
luax_pushnumber(L, i->getWidth());
luax_pushnumber(L, i->getHeight());
return 2;
@@ -64,7 +64,7 @@ namespace lua
static int l_gc(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_checktype(L, 1, TYPE_IMAGE);
- Image* img = (Image*)proxy->object;
+ Texture* img = (Texture*)proxy->object;
delete img;
return 0;
}