]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest.cc
patch::: 1.1.37.mb1: Re: LilyPond 1.1.37
[lilypond.git] / lily / rest.cc
index 0c527bd9ba8d9595f6d8d13bc51031645937b43f..b737dea036fa772709d0e1a678d53de65627132f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "molecule.hh"
@@ -37,13 +37,19 @@ Rest::Rest ()
 Molecule *
 Rest::do_brew_molecule_p () const
 {
-  int staff_size_i_ = 8;
-  bool streepjes_b = abs(position_i_) > staff_size_i_ /2 &&  
+  bool streepjes_b = abs(position_i_) > lines_i () / 2 &&  
     (balltype_i_ == 0 || balltype_i_ == 1);
   
-  Atom s(lookup_l ()->rest (balltype_i_, streepjes_b));
-  Molecule * m = new Molecule ( Atom (s));
-  m->translate_axis (position_i_ *  paper ()->internote_f (), Y_AXIS);
+  String style; 
+  SCM style_sym =get_elt_property (style_scm_sym);
+  if (style_sym != SCM_BOOL_F)
+    {
+      style = ly_scm2string (SCM_CDR(style_sym));
+    }
+  
+  Molecule s(lookup_l ()->rest (balltype_i_, streepjes_b, style));
+  Molecule * m = new Molecule ( Molecule (s));
+  m->translate_axis (position_i_ *  staff_line_leading_f ()/2.0, Y_AXIS);
   return m;
 }