-Molecule*
-Crescendo::do_brew_molecule_p () const
-{
- Molecule* m_p =0;
- Real absdyn_dim = paper_l ()-> get_realvar (ly_symbol ("crescendo_shorten"));
- Real x_off_dim=0.0;
- if (dyn_b_drul_[LEFT])
- x_off_dim += absdyn_dim;
-
- m_p = new Molecule;
- Molecule s (get_symbol ());
- m_p->add_molecule (s);
- m_p->translate_axis (x_off_dim, X_AXIS);
- return m_p;
+ width -= start_text.extent (X_AXIS).length ();
+ width -= pad;
+ width = width >? 0;
+ }
+
+ SCM at;
+ s =me->get_elt_property ("spanner");
+ Real height;
+ if (gh_string_p (s) && ly_scm2string (s) == "dashed-line")
+ {
+ Real thick = me->paper_l ()->get_var ("crescendo_dash_thickness");
+ Real dash = me->paper_l ()->get_var ("crescendo_dash");
+ height = thick;
+ at = gh_list (ly_symbol2scm (ly_scm2string (s).ch_C ()),
+ gh_double2scm (thick),
+ gh_double2scm (dash),
+ gh_double2scm (width),
+ SCM_UNDEFINED);
+ }
+ else
+ {
+ bool continued = broken[Direction (-gd)];
+ height = me->paper_l()->get_var ("crescendo_height");
+ Real thick = me->paper_l ()->get_var ("crescendo_thickness");
+
+ const char* hairpin = (gd < 0)? "decrescendo" : "crescendo";
+
+ at = gh_list (ly_symbol2scm (hairpin),
+ gh_double2scm (thick),
+ gh_double2scm (width),
+ gh_double2scm (height),
+ gh_double2scm (continued ? height/2 : 0.0),
+ SCM_UNDEFINED);
+ }
+ Box b (Interval (0, width), Interval (-2*height, 2*height));
+ Molecule span (b, at);
+
+ m.add_at_edge (X_AXIS, RIGHT, span, pad);
+ m.translate_axis (extra_left, X_AXIS);
+
+ return m.create_scheme ();