]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing.cc
2003 -> 2004
[lilypond.git] / lily / note-spacing.cc
index 9964632f30a68067cf01a7ea356bded13a8f903e..1b60b1cec59bc725ffefa23d2b126d0bfc52d748 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2001--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -269,7 +269,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
                      it = it->find_prebroken_piece (rcolumn->break_status_dir ());
                    }
                  
-                 Grob *last = Staff_spacing::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
+                 Grob *last = Separation_item::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
 
                  if (last)
                    bar_yextent = Staff_spacing::bar_y_positions (last);
@@ -355,15 +355,14 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
 
              if (st)
                {
-                 Real thick = gh_scm2double (st->get_grob_property ("thickness"))
-                   * st->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+                 Real thick = Stem::thickness (st);
 
                  note_head_width -= thick;
                }
            }
 
          correction = note_head_width* stem_dirs[LEFT];
-         correction *= gh_scm2double (me->get_grob_property ("knee-spacing-correction"));
+         correction *= robust_scm2double (me->get_grob_property ("knee-spacing-correction"), 0);
          *fixed += correction;
        }
       else
@@ -383,7 +382,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
              correction = (correction/7) <? 1.0;
              correction *= stem_dirs[LEFT] ;
              correction *=
-               gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+               robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0);
            }
          
          if (!bar_yextent.is_empty ())
@@ -423,7 +422,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
        (head_posns[LEFT][DOWN] > head_posns[RIGHT][UP]) ? RIGHT : LEFT;
 
       Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP] ;
-      Real corr = gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+      Real corr = robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0);
       corr =  (delta <= 1) ? 0.0 : 0.25;
       
       correction=  -lowest * corr ;