mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
More float quad work (issue #285)
This commit is contained in:
@@ -492,7 +492,7 @@ namespace opengl
|
|||||||
return image;
|
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;
|
Quad::Viewport v;
|
||||||
v.x = x;
|
v.x = x;
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ namespace opengl
|
|||||||
/**
|
/**
|
||||||
* Creates a Quad object.
|
* 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.
|
* Creates a Font object.
|
||||||
|
|||||||
@@ -226,12 +226,12 @@ namespace opengl
|
|||||||
|
|
||||||
int w_newQuad(lua_State * L)
|
int w_newQuad(lua_State * L)
|
||||||
{
|
{
|
||||||
int x = luaL_checknumber(L, 1);
|
float x = (float) luaL_checknumber(L, 1);
|
||||||
int y = luaL_checknumber(L, 2);
|
float y = (float) luaL_checknumber(L, 2);
|
||||||
int w = luaL_checknumber(L, 3);
|
float w = (float) luaL_checknumber(L, 3);
|
||||||
int h = luaL_checknumber(L, 4);
|
float h = (float) luaL_checknumber(L, 4);
|
||||||
int sw = luaL_checknumber(L, 5);
|
float sw = (float) luaL_checknumber(L, 5);
|
||||||
int sh = luaL_checknumber(L, 6);
|
float sh = (float) luaL_checknumber(L, 6);
|
||||||
|
|
||||||
Quad * frame = instance->newQuad(x, y, w, h, sw, sh);
|
Quad * frame = instance->newQuad(x, y, w, h, sw, sh);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user