From 64587ab6653523c4874c31bbf26e4d631edb4b03 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:56:15 +0000 Subject: [PATCH] lilypond-0.1.12 --- lily/slur.cc | 10 +++++++++- lily/tie.cc | 21 +++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/lily/slur.cc b/lily/slur.cc index 87dea00618..a4349ab750 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -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_]); diff --git a/lily/tie.cc b/lily/tie.cc index 190618869b..b5863193cf 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -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); -- 2.39.5