Fix ArdourHTTP error reporting
[ardour.git] / scripts / vamp_audio_to_midi.lua
index 79fc32ac83bc0974aed57da8184b8c39e8a80225..5792e8f115677eb4c873f712615266c2e0e163be 100644 (file)
@@ -68,3 +68,12 @@ function factory () return function ()
                end
        end
 end end
+
+function icon (params) return function (ctx, width, height, fg)
+       local txt = Cairo.PangoLayout (ctx, "ArdourMono ".. math.ceil(width * .7) .. "px")
+       txt:set_text ("\u{2669}") -- quarter note symbol UTF8
+       local tw, th = txt:get_pixel_size ()
+       ctx:set_source_rgba (ARDOUR.LuaAPI.color_to_rgba (fg))
+       ctx:move_to (.5 * (width - tw), .5 * (height - th))
+       txt:show_in_cairo_context (ctx)
+end end