]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-column.cc
patch::: 1.3.9.hwn2
[lilypond.git] / lily / note-column.cc
index ab26d7b48d25e596807056087bf096909061e580..844ad7701ad6e00371ecaf5e80487046c843e630 100644 (file)
@@ -23,11 +23,11 @@ Note_column::rest_b () const
 int
 Note_column::shift_compare (Note_column *const &p1, Note_column*const&p2)
 {
-  SCM s1 = p1->get_elt_property (horizontal_shift_scm_sym);
-  SCM s2 = p2->get_elt_property (horizontal_shift_scm_sym);
+  SCM s1 = p1->get_elt_property ("horizontal-shift");
+  SCM s2 = p2->get_elt_property ("horizontal-shift");
 
-  int h1 = (s1 == SCM_BOOL_F) ? 0 : gh_scm2int (SCM_CDR(s1));
-  int h2 = (s2 == SCM_BOOL_F) ? 0 : gh_scm2int (SCM_CDR(s2));
+  int h1 = (s1 == SCM_UNDEFINED) ? 0 : gh_scm2int (s1);
+  int h2 = (s2 == SCM_UNDEFINED) ? 0 : gh_scm2int (s2);
   return h1 - h2;
 }
 
@@ -61,7 +61,7 @@ Direction
 Note_column::dir () const
 {
   if (stem_l_)
-    return stem_l_->dir_;
+    return stem_l_->get_direction ();
   else if (head_l_arr_.size ())
     return (Direction)sign (head_positions_interval().center ());
 
@@ -129,8 +129,8 @@ void
 Note_column::do_print() const
 {
 #ifndef NPRINT
-  DOUT << "rests: " << rest_l_arr_.size() << ", ";
-  DOUT << "heads: " << head_l_arr_.size();
+  DEBUG_OUT << "rests: " << rest_l_arr_.size() << ", ";
+  DEBUG_OUT << "heads: " << head_l_arr_.size();
 #endif
 }
 
@@ -157,13 +157,13 @@ Note_column::do_post_processing ()
   if (!stem_l_ || !rest_b ())
     return;
 
-  Beam * b = stem_l_->beam_l_;
-  if (!b || !b->stems_.size ())
+  Beam * b = stem_l_->beam_l ();
+  if (!b || !b->stem_count ())
     return;
   
   /* ugh. Should be done by beam. */
-  Direction d = stem_l_->get_dir ();
-  Real beamy = (stem_l_->hpos_f () - b->stems_[0]->hpos_f ()) * b->slope_f_ + b->left_y_;
+  Direction d = stem_l_->get_direction ();
+  Real beamy = (stem_l_->hpos_f () - b->stem(0)->hpos_f ()) * b->slope_f_ + b->left_y_;
 
   Real staff_space = rest_l_arr_[0]->staff_line_leading_f ();      
   Real rest_dim = extent (Y_AXIS)[d]*2.0  /staff_space ;
@@ -184,3 +184,4 @@ Note_column::do_post_processing ()
 
   translate_rests (-d *  discrete_dist);
 }
+