Skip to content

Commit d0bc4f4

Browse files
committed
Fix lua svg positioning
1 parent bd69e11 commit d0bc4f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/Objects/LuaObject.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,12 @@ class LuaObject final : public ObjectBase
498498
}
499499
case hash("lua_draw_svg"): {
500500
if (argc >= 1) {
501+
float const x = atom_getfloat(argv + 1);
502+
float const y = atom_getfloat(argv + 2);
503+
nvgSave(nvg);
504+
nvgTranslate(nvg, x, y);
501505
drawSVG(nvg, atom_getsymbol(argv)->s_name);
506+
nvgRestore(nvg);
502507
}
503508
break;
504509
}

0 commit comments

Comments
 (0)