More float quad work (issue #285)

This commit is contained in:
Bart van Strien
2011-08-25 14:06:50 +02:00
parent b14ca78109
commit 5c43ba2779
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -492,7 +492,7 @@ namespace opengl
return image;
}
Quad * Graphics::newQuad(int x, int y, int w, int h, int sw, int sh)
Quad * Graphics::newQuad(float x, float y, float w, float h, float sw, float sh)
{
Quad::Viewport v;
v.x = x;
+1 -1
View File
@@ -276,7 +276,7 @@ namespace opengl
/**
* Creates a Quad object.
**/
Quad * newQuad(int x, int y, int w, int h, int sw, int sh);
Quad * newQuad(float x, float y, float w, float h, float sw, float sh);
/**
* Creates a Font object.
@@ -226,12 +226,12 @@ namespace opengl
int w_newQuad(lua_State * L)
{
int x = luaL_checknumber(L, 1);
int y = luaL_checknumber(L, 2);
int w = luaL_checknumber(L, 3);
int h = luaL_checknumber(L, 4);
int sw = luaL_checknumber(L, 5);
int sh = luaL_checknumber(L, 6);
float x = (float) luaL_checknumber(L, 1);
float y = (float) luaL_checknumber(L, 2);
float w = (float) luaL_checknumber(L, 3);
float h = (float) luaL_checknumber(L, 4);
float sw = (float) luaL_checknumber(L, 5);
float sh = (float) luaL_checknumber(L, 6);
Quad * frame = instance->newQuad(x, y, w, h, sw, sh);