diff options
author | Paul Morris <paulwmorris@gmail.com> | 2016-09-18 11:32:05 -0400 |
---|---|---|
committer | Paul Morris <paulwmorris@gmail.com> | 2016-10-04 11:07:04 -0400 |
commit | f80e0f5e69fa8ffb35b6d3b7d162ed4191586c0c (patch) | |
tree | c5e8aabcec6892a64f17c7b74b196afe869f04fd /lily | |
parent | 71fa1bbb755d3ba14eea93394af88fa4a1092222 (diff) |
Issue 4974/1: Add output-attributes grob property
It is used for setting multiple attributes on <g>
nodes in SVG output, specified as an alist. The id
grob property is no longer used for this.
Diffstat (limited to 'lily')
-rw-r--r-- | lily/grob.cc | 11 | ||||
-rw-r--r-- | lily/stencil-integral.cc | 2 | ||||
-rw-r--r-- | lily/stencil-interpret.cc | 9 |
3 files changed, 12 insertions, 10 deletions
diff --git a/lily/grob.cc b/lily/grob.cc index 23a1cafae4..924c80e500 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -189,11 +189,11 @@ Grob::get_print_stencil () const retval = Stencil (retval.extent_box (), expr); } - SCM id = get_property ("id"); - if (scm_is_string (id)) + SCM attributes = get_property ("output-attributes"); + if (scm_is_pair (attributes)) { - SCM expr = scm_list_3 (ly_symbol2scm ("id"), - id, + SCM expr = scm_list_3 (ly_symbol2scm ("output-attributes"), + attributes, retval.expr ()); retval = Stencil (retval.extent_box (), expr); @@ -816,16 +816,17 @@ ADD_INTERFACE (Grob, "cause " "color " "cross-staff " - "id " "extra-offset " "footnote-music " "forced-spacing " "horizontal-skylines " + "id " "interfaces " "layer " "meta " "minimum-X-extent " "minimum-Y-extent " + "output-attributes " "parenthesis-friends " "pure-Y-offset-in-progress " "rotation " diff --git a/lily/stencil-integral.cc b/lily/stencil-integral.cc index ee12c53f36..1b9aa5181b 100644 --- a/lily/stencil-integral.cc +++ b/lily/stencil-integral.cc @@ -944,7 +944,7 @@ stencil_traverser (PangoMatrix trans, SCM expr) return stencil_traverser (trans, scm_caddr (expr)); else if (scm_is_eq (scm_car (expr), ly_symbol2scm ("transparent-stencil"))) return stencil_traverser (trans, scm_cadr (expr)); - else if (scm_is_eq (scm_car (expr), ly_symbol2scm ("id"))) + else if (scm_is_eq (scm_car (expr), ly_symbol2scm ("output-attributes"))) return stencil_traverser (trans, scm_caddr (expr)); else { diff --git a/lily/stencil-interpret.cc b/lily/stencil-interpret.cc index 87e6496de7..25fad0d842 100644 --- a/lily/stencil-interpret.cc +++ b/lily/stencil-interpret.cc @@ -78,13 +78,14 @@ interpret_stencil_expression (SCM expr, return; } - else if (scm_is_eq (head, ly_symbol2scm ("id"))) + else if (scm_is_eq (head, ly_symbol2scm ("output-attributes"))) { - SCM id = scm_cadr (expr); + SCM attributes = scm_cadr (expr); - (*func) (func_arg, scm_list_2 (ly_symbol2scm ("start-enclosing-id-node"), id)); + (*func) (func_arg, scm_list_2 (ly_symbol2scm ("start-group-node"), + ly_quote_scm (attributes))); interpret_stencil_expression (scm_caddr (expr), func, func_arg, o); - (*func) (func_arg, scm_list_1 (ly_symbol2scm ("end-enclosing-id-node"))); + (*func) (func_arg, scm_list_1 (ly_symbol2scm ("end-group-node"))); return; } |