mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Add missing applyTransform and replaceTransform functions…
--HG-- branch : minor
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include "video/VideoStream.h"
|
#include "video/VideoStream.h"
|
||||||
#include "image/wrap_Image.h"
|
#include "image/wrap_Image.h"
|
||||||
#include "common/Reference.h"
|
#include "common/Reference.h"
|
||||||
|
#include "math/wrap_Transform.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@@ -2124,6 +2125,20 @@ int w_origin(lua_State * /*L*/)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int w_applyTransform(lua_State *L)
|
||||||
|
{
|
||||||
|
math::Transform *t = math::luax_checktransform(L, 1);
|
||||||
|
instance()->applyTransform(t);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int w_replaceTransform(lua_State *L)
|
||||||
|
{
|
||||||
|
math::Transform *t = math::luax_checktransform(L, 1);
|
||||||
|
instance()->replaceTransform(t);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int w_transformPoint(lua_State *L)
|
int w_transformPoint(lua_State *L)
|
||||||
{
|
{
|
||||||
Vector p;
|
Vector p;
|
||||||
@@ -2252,6 +2267,8 @@ static const luaL_Reg functions[] =
|
|||||||
{ "translate", w_translate },
|
{ "translate", w_translate },
|
||||||
{ "shear", w_shear },
|
{ "shear", w_shear },
|
||||||
{ "origin", w_origin },
|
{ "origin", w_origin },
|
||||||
|
{ "applyTransform", w_applyTransform },
|
||||||
|
{ "replaceTransform", w_replaceTransform },
|
||||||
{ "transformPoint", w_transformPoint },
|
{ "transformPoint", w_transformPoint },
|
||||||
{ "inverseTransformPoint", w_inverseTransformPoint },
|
{ "inverseTransformPoint", w_inverseTransformPoint },
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace love
|
|||||||
namespace math
|
namespace math
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Transform *luax_checktransform(lua_State *L, int idx);
|
||||||
extern "C" int luaopen_transform(lua_State *L);
|
extern "C" int luaopen_transform(lua_State *L);
|
||||||
|
|
||||||
} // math
|
} // math
|
||||||
|
|||||||
Reference in New Issue
Block a user