diff --git a/laf b/laf index f59032bfc..511de99c3 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit f59032bfcfbccedc107006ddca814f46ef0eb27f +Subproject commit 511de99c370eb7bfd8cfdb1307dbef3bb2557c0d diff --git a/src/app/script/graphics_context.cpp b/src/app/script/graphics_context.cpp index 334a34ed5..24fdd657c 100644 --- a/src/app/script/graphics_context.cpp +++ b/src/app/script/graphics_context.cpp @@ -306,6 +306,14 @@ int GraphicsContext_cubicTo(lua_State* L) return 1; } +int GraphicsContext_oval(lua_State* L) +{ + auto gc = get_obj(L, 1); + const gfx::Rect rc = convert_args_into_rect(L, 2); + gc->oval(rc); + return 0; +} + int GraphicsContext_rect(lua_State* L) { auto gc = get_obj(L, 1); @@ -447,6 +455,7 @@ const luaL_Reg GraphicsContext_methods[] = { { "moveTo", GraphicsContext_moveTo }, { "lineTo", GraphicsContext_lineTo }, { "cubicTo", GraphicsContext_cubicTo }, + { "oval", GraphicsContext_oval }, { "rect", GraphicsContext_rect }, { "roundedRect", GraphicsContext_roundedRect }, { "stroke", GraphicsContext_stroke }, diff --git a/src/app/script/graphics_context.h b/src/app/script/graphics_context.h index 34ce3f8a3..ef6536f0c 100644 --- a/src/app/script/graphics_context.h +++ b/src/app/script/graphics_context.h @@ -102,6 +102,9 @@ public: void cubicTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) { m_path.cubicTo(cp1x, cp1y, cp2x, cp2y, x, y); } + void oval(const gfx::Rect& rc) { + m_path.oval(rc); + } void rect(const gfx::Rect& rc) { m_path.rect(rc); }