mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
More float quad work (issue #285)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user