Commit 485991f4 authored by Hanspeter Portner's avatar Hanspeter Portner

idisp: implement cairo backend.

parent 53978ae3
Pipeline #4532722 failed with stages
in 17 minutes and 53 seconds
......@@ -62,7 +62,7 @@ set(LIBS ${LIBS} ${LV2_LDFLAGS})
include(CMakeDependentOption)
option(BUILD_SIMPLE_UI "Build simple external UI" OFF)
option(BUILD_WEB_UI "Build web-based external UI" ON)
option(BUILD_INLINE_DISPLAY "Build inline display" OFF)
option(BUILD_INLINE_DISPLAY "Build inline display" ON)
option(USE_MANUAL_GC "Use manual garbage collection" OFF)
option(USE_VERBOSE_LOG "Use verbose log for websocket" OFF)
......@@ -72,7 +72,7 @@ if(BUILD_INLINE_DISPLAY)
pkg_search_module(CAIRO REQUIRED cairo>=1.14.0)
include_directories(${CAIRO_INCLUDE_DIRS})
if(DEFINED STATIC_CAIRO)
set(LIBS ${STATIC_PIXMAN} ${STATIC_CAIRO} ${LIBS})
set(LIBS ${STATIC_CAIRO} ${STATIC_PIXMAN} ${LIBS})
else()
set(LIBS ${LIBS} ${CAIRO_LDFLAGS})
endif()
......
This diff is collapsed.
......@@ -56,6 +56,10 @@
#include <lua.h>
#include <lauxlib.h>
#ifdef BUILD_INLINE_DISPLAY
# include <cairo.h>
#endif
#ifdef LV2_ATOM_TUPLE_FOREACH
# undef LV2_ATOM_TUPLE_FOREACH
# define LV2_ATOM_TUPLE_FOREACH(tuple, iter) \
......@@ -252,6 +256,20 @@ struct _moony_t {
LV2_URID atom_beat_time;
LV2_URID atom_frame_time;
LV2_URID canvas_body;
LV2_URID canvas_moveTo;
LV2_URID canvas_lineTo;
LV2_URID canvas_rectangle;
LV2_URID canvas_arc;
LV2_URID canvas_curveTo;
LV2_URID canvas_color;
LV2_URID canvas_lineWidth;
LV2_URID canvas_closePath;
LV2_URID canvas_stroke;
LV2_URID canvas_fill;
LV2_URID canvas_fontSize;
LV2_URID canvas_showText;
} uris;
struct {
......@@ -275,6 +293,12 @@ struct _moony_t {
LV2_Inline_Display *queue_draw;
LV2_Inline_Display_Image_Surface image_surface;
#ifdef BUILD_INLINE_DISPLAY
struct {
cairo_surface_t *surface;
cairo_t *ctx;
} cairo;
#endif
moony_vm_t vm;
......
......@@ -77,6 +77,8 @@ var LuaHighlightRules = function() {
"label|range|comment|"+
// moony Units
"Conversion|Unit|bar|beat|bpm|cent|cm|coef|conversion|db|degree|frame|hz|inch|khz|km|m|mhz|midiNote|mile|min|mm|ms|name|oct|pc|prefixConversion|render|s|semitone12TET|symbol|unit|"+
// moony Units
"body|moveTo|lineTo|rectangle|arc|curveTo|color|lineWidth|closePath|stroke|fill|fontSize|showText|"+
// moony common
"type|body|"+
......@@ -93,7 +95,7 @@ var LuaHighlightRules = function() {
// Lua
"coroutine|string|utf8|table|math|debug|"+
// moony
"Atom|MIDI|Time|OSC|Core|Buf_Size|Patch|RDF|RDFS|Units|Options|"+
"Atom|MIDI|Time|OSC|Core|Buf_Size|Patch|RDF|RDFS|Units|Options|Canvas|"+
"MIDIResponder|OSCResponder|TimeResponder|StateResponder|Map|Unmap|VoiceMap|Stash|Note|HashMap");
var keywordMapper = this.createKeywordMapper({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment