X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fslur.cc;h=2e573ebf7c44749e201b72a29a03d4ac92e94bcd;hb=fc273c71061c4859cebc95bb91d86c9373d94f64;hp=c37aa72ad9b53a98cd6e395fa9e8b0da5e8ade96;hpb=92d1a61acbd9b8a4556eaff60894426b7e133e6f;p=lilypond.git diff --git a/lily/slur.cc b/lily/slur.cc index c37aa72ad9..2e573ebf7c 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -98,9 +98,6 @@ Slur::height (SCM smob) : ly_interval2scm (Interval ()); } -/* - Ugh should have dash-length + dash-period -*/ MAKE_SCHEME_CALLBACK (Slur, print, 1); SCM Slur::print (SCM smob) @@ -122,9 +119,6 @@ Slur::print (SCM smob) Bezier one = get_curve (me); Stencil a; - /* - TODO: replace dashed with generic property. - */ SCM p = me->get_property ("dash-period"); SCM f = me->get_property ("dash-fraction"); if (scm_is_number (p) && scm_is_number (f)) @@ -136,23 +130,26 @@ Slur::print (SCM smob) line_thick); #if DEBUG_SLUR_SCORING - SCM quant_score = me->get_property ("quant-score"); - - if (to_boolean (me->layout () - ->lookup_variable (ly_symbol2scm ("debug-slur-scoring"))) - && scm_is_string (quant_score)) + SCM annotation = me->get_property ("annotation"); + if (!scm_is_string (annotation)) + { + SCM debug = me->layout ()->lookup_variable (ly_symbol2scm ("debug-slur-scoring")); + if (to_boolean (debug)) + annotation = me->get_property ("quant-score"); + } + + if (scm_is_string (annotation)) { string str; SCM properties = Font_interface::text_font_alist_chain (me); - if (!scm_is_number (me->get_property ("font-size"))) properties = scm_cons (scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-6), SCM_EOL), properties); Stencil tm = *unsmob_stencil (Text_interface::interpret_markup (me->layout ()->self_scm (), properties, - quant_score)); + annotation)); a.add_at_edge (Y_AXIS, get_grob_direction (me), tm, 1.0); } #endif @@ -394,6 +391,7 @@ ADD_INTERFACE (Slur, "A slur", /* properties */ + "annotation " "avoid-slur " /* UGH. */ "control-points " "dash-fraction "