-
- bool continued = broken[Direction (-gd)];
- Real height = paper_l()->get_var ("crescendo_height");
- Real thick = paper_l ()->get_var ("crescendo_thickness");
-
- const char* hairpin = (gd < 0)? "decrescendo" : "crescendo";
- Molecule * m
- = new Molecule;
- m->dim_.x () = Interval (0, width);
- m->dim_.y () = Interval (-2*height, 2*height);
-
- Atom *a = new Atom(gh_list (ly_symbol2scm (hairpin),
- gh_double2scm (thick),
- gh_double2scm (width),
- gh_double2scm (height),
- gh_double2scm (continued ? height/2 : 0.0),
- SCM_UNDEFINED));
-
- m->add_atom (a->self_scm_);
- m->translate_axis (extra_left, X_AXIS);
- return m;
+ bool continued = broken[Direction (-grow_dir)];
+ Real height = staff_space * gh_scm2double (me->get_elt_property ("height"));
+ Real thick = line * gh_scm2double (me->get_elt_property ("thickness"));
+
+ const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo";
+ SCM hairpin = gh_list (ly_symbol2scm (type),
+ 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 mol (b, hairpin);
+ mol.translate_axis (broken_left, X_AXIS);
+
+ return mol.create_scheme ();