]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/crescendo.cc
release: 1.3.28
[lilypond.git] / lily / crescendo.cc
index 3fc7f4b44c73a8907b8f522c01393b535c840f94..481d30bca713b4c7335cf3542176dfec5a55b89a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "molecule.hh"
@@ -28,13 +28,13 @@ Crescendo::do_brew_molecule_p () const
   Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten");
   Real extra_left =  get_broken_left_end_align ();
 
-  SCM dir = get_elt_property("grow-dir");
+  SCM dir = get_elt_property("grow-direction");
   SCM dyns = get_elt_property ("dynamic-drul");
 
   if (!isdir_b (dir) || !gh_pair_p (dyns))
     {
-      Crescendo* urg= (Crescendo*)this;
-      urg->set_elt_property ("transparent", SCM_BOOL_T);
+Crescendo * me = (Crescendo*)this;
+      me->set_elt_property ("transparent", SCM_BOOL_T);
       return new Molecule;
     }
   
@@ -78,19 +78,19 @@ Crescendo::do_brew_molecule_p () const
   Real thick = paper_l ()->get_var ("crescendo_thickness");
 
   const char* hairpin = (gd < 0)? "decrescendo" :  "crescendo";
-  Atom at  (gh_list (ly_symbol2scm (hairpin),
-                    gh_double2scm (thick),
-                    gh_double2scm (width),
-                    gh_double2scm (height),
-                    gh_double2scm (continued ? height/2 : 0.0),
-                    SCM_UNDEFINED));
   Molecule * m
     = new Molecule;
-  
   m->dim_.x () = Interval (0, width);
   m->dim_.y () = Interval (-2*height, 2*height);
-  m->add_atom (&at);
-  
+
+  SCM at = 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 (at);
   m->translate_axis (extra_left, X_AXIS);
   return m;
 }