summaryrefslogtreecommitdiff
path: root/scripts/delete_xrun_markers.lua
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-02-18 16:12:59 +0100
committerRobin Gareus <robin@gareus.org>2017-02-18 16:12:59 +0100
commit1ab3d33df7b86cab5e168ae0a22f7c0de117141e (patch)
tree658e0af6d3fd247172687688d0f95a59cc81a2cf /scripts/delete_xrun_markers.lua
parent4755c703f4b01cd7de01bda0c72686b93e34e120 (diff)
Some more EditorAction icons & color API update
Diffstat (limited to 'scripts/delete_xrun_markers.lua')
-rw-r--r--scripts/delete_xrun_markers.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/delete_xrun_markers.lua b/scripts/delete_xrun_markers.lua
index 2530ec2a8e..5512e653b6 100644
--- a/scripts/delete_xrun_markers.lua
+++ b/scripts/delete_xrun_markers.lua
@@ -7,3 +7,34 @@ function factory () return function ()
end
end
end end
+
+function icon (params) return function (ctx, width, height, fg)
+ local mh = height - 3.5;
+ local m3 = width / 3;
+ local m6 = width / 6;
+
+ ctx:set_line_width (.5)
+
+ ctx:set_source_rgba (.8, .2, .2, 1.0)
+ ctx:move_to (width / 2 - m6, 2)
+ ctx:rel_line_to (m3, 0)
+ ctx:rel_line_to (0, mh * 0.4)
+ ctx:rel_line_to (-m6, mh * 0.6)
+ ctx:rel_line_to (-m6, -mh * 0.6)
+ ctx:close_path ()
+ ctx:fill_preserve ()
+ ctx:set_source_rgba (.0, .0, .0, 1.0)
+ ctx:stroke ()
+
+ ctx:set_source_rgba (ARDOUR.LuaAPI.color_to_rgba (fg))
+ ctx:set_line_width (1)
+
+ ctx:move_to (width * .2, height * .2)
+ ctx:line_to (width * .8, height * .8)
+ ctx:stroke ()
+
+ ctx:move_to (width * .8, height * .2)
+ ctx:line_to (width * .2, height * .8)
+ ctx:stroke ()
+
+end end