MINI v.0.9.64d:

- [NEW] origin(x,y) sets the origin of the coordinate system.
- [FIX] false extern declaration removed.
- MINI_VERSION has its own header file.
This commit is contained in:
2023-07-05 07:58:31 +02:00
parent dab7a96ec2
commit 9b99aa23cf
5 changed files with 22 additions and 3 deletions

View File

@@ -291,6 +291,13 @@ extern "C" {
return 0;
}
static int cpp_origin(lua_State *L) {
int x = luaL_checknumber(L, 1);
int y = luaL_checknumber(L, 2);
origin(x, y);
return 0;
}
static int cpp_circ(lua_State *L) {
int x = luaL_checknumber(L, 1);
int y = luaL_checknumber(L, 2);
@@ -855,6 +862,7 @@ void push_lua_funcs() {
lua_pushcfunction(L,cpp_clip); lua_setglobal(L, "clip");
lua_pushcfunction(L,cpp_camera); lua_setglobal(L, "camera");
lua_pushcfunction(L,cpp_view); lua_setglobal(L, "view");
lua_pushcfunction(L,cpp_origin); lua_setglobal(L, "origin");
lua_pushcfunction(L,cpp_circ); lua_setglobal(L, "circ");
lua_pushcfunction(L,cpp_circfill); lua_setglobal(L, "circfill");
lua_pushcfunction(L,cpp_oval); lua_setglobal(L, "oval");