X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fdynamic-text-spanner.cc;h=ff6eac541e4dd76e1833b57c715a337dbd09acca;hb=21f723292cdb8154f0255494360c25d48422dff6;hp=1ebb70fe8cbe186669e4c8ae5cd6fecd3efc79a3;hpb=d8423d48b957180dd6b236b3239d0b885e620db0;p=lilypond.git diff --git a/lily/dynamic-text-spanner.cc b/lily/dynamic-text-spanner.cc index 1ebb70fe8c..ff6eac541e 100644 --- a/lily/dynamic-text-spanner.cc +++ b/lily/dynamic-text-spanner.cc @@ -22,7 +22,7 @@ class Dynamic_text_spanner { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; /* @@ -51,7 +51,8 @@ Dynamic_text_spanner::print (SCM smob) Grob *me = unsmob_grob (smob); Spanner *spanner = dynamic_cast (me); - Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS); + Grob *common = spanner->get_bound (LEFT) + ->common_refpoint (spanner->get_bound (RIGHT), X_AXIS); Output_def *layout = me->layout (); Interval span_points; @@ -81,12 +82,20 @@ Dynamic_text_spanner::print (SCM smob) /* ugh - a special case. + + FIXME: this fixed an issue, but need to have this issue in + the issue tracker. + + This fix doesn't quite work: it should only do this if the + right bound has a trill too. */ +#if 0 if (d == RIGHT && me->get_property ("style") == ly_symbol2scm ("trill")) { pad = 2.0; encl = LEFT; } +#endif Interval ext = b->extent (common, X_AXIS); span_points[d] = -d * pad @@ -96,7 +105,6 @@ Dynamic_text_spanner::print (SCM smob) } while (flip (&d) != LEFT); - Stencil m; SCM properties = Font_interface::text_font_alist_chain (me); SCM edge_text = me->get_property ("edge-text"); Drul_array edge; @@ -119,6 +127,7 @@ Dynamic_text_spanner::print (SCM smob) while (flip (&d) != LEFT); } + Stencil m; do { Interval ext = edge[d].extent (X_AXIS); @@ -145,7 +154,6 @@ Dynamic_text_spanner::print (SCM smob) } ADD_INTERFACE (Dynamic_text_spanner, - "dynamic-text-spanner-interface", "A text spanner for crescendo texts", "bound-padding "