]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.12
authorfred <fred>
Sun, 24 Mar 2002 19:56:15 +0000 (19:56 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:56:15 +0000 (19:56 +0000)
lily/slur.cc
lily/tie.cc

index 87dea00618ae29386171ec4c19e56771beb5e24f..a4349ab750a06095055957dd57408138b2813f7a 100644 (file)
@@ -87,9 +87,17 @@ Slur::do_post_processing()
   extrema[RIGHT] = encompass_arr_.top();
 
   Direction d=LEFT;
+  Real nw_f = paper()->note_width ();
+  while ((d *= -1) != LEFT);
   do 
     {
-      if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) 
+      if  (extrema[d] != spanned_drul_[d]) 
+       {
+         dx_f_drul_[d] = -d 
+           *(spanned_drul_[d]->width ().length ()/nw_f -0.5);
+       }
+      else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) 
        pos_i_drul_[d] = (int)rint (extrema[d]->stem_l_->height()[dir_]/inter_f);
       else 
        pos_i_drul_[d] = (int)rint (extrema[d]->head_positions_interval()[dir_]);
index 190618869bdfcb7f9fdfbeb2606c08253c554061..b5863193cf5d81727494e6167cd43432a2222dfd 100644 (file)
@@ -31,10 +31,9 @@ Tie::Tie()
 void
 Tie::set_default_dir()
 {
-  int m= (head_l_drul_[LEFT]->position_i_ + head_l_drul_[RIGHT]->position_i_) /2 ;
+  int m= (head_l_drul_[LEFT]->position_i_ + head_l_drul_[RIGHT]->position_i_) /2;
   dir_ =  (m < 5)? DOWN : UP;  // UGH
 }
-  
 
 void
 Tie::do_add_processing()
@@ -47,6 +46,7 @@ Tie::do_add_processing()
 void
 Tie::do_post_processing()
 {
+  Real nw_f = paper()->note_width ();
   assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
 
   Direction d = LEFT;
@@ -64,17 +64,16 @@ Tie::do_post_processing()
          pos_i_drul_[d] += 2*dir_;
          dx_f_drul_[d] += d * 0.25;
        }
-      else
+      else if (head_l_drul_[d])
        dx_f_drul_[d] += d*0.5;
+      else
+       {
+         pos_i_drul_[d] = pos_i_drul_[(Direction) -d];
+         dx_f_drul_[d] = -d 
+           *(spanned_drul_[d]->width ().length ()/nw_f -0.5);
+       }
     }
   while ((d *= -1) != LEFT);
-
-  do 
-    {
-      if (!head_l_drul_[d])
-       pos_i_drul_[d] = pos_i_drul_[(Direction)-d];
-    } 
-  while ((d *= -1) != LEFT);
 }
 
 
@@ -89,6 +88,4 @@ Tie::do_substitute_dependency (Score_elem*o, Score_elem*n)
     head_l_drul_[RIGHT] = new_l;
 }
 
-
-
 IMPLEMENT_IS_TYPE_B1(Tie,Bow);