From: fred Date: Sun, 24 Mar 2002 19:41:37 +0000 (+0000) Subject: lilypond-0.0.55 X-Git-Tag: release/1.5.59~4823 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f5ceee413a3d972b355820d7b5112e12595bbb18;p=lilypond.git lilypond-0.0.55 --- diff --git a/lily/.version b/lily/.version index 99892df436..f50a4d2508 100644 --- a/lily/.version +++ b/lily/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 54 +PATCH_LEVEL = 55 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/lily/script.cc b/lily/script.cc index 2f471e6ef2..8a35f2ed89 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -74,7 +74,8 @@ Script::symbol()const void Script::do_pre_processing() { - set_default_dir(); + if (!dir_i_) + set_default_dir(); set_symdir(); } diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 0bf26223ab..b9974b5b5a 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -6,6 +6,7 @@ (c) 1997 Han-Wen Nienhuys */ +#include "dimen.hh" #include "staff-side.hh" #include "staff-sym.hh" #include "debug.hh" @@ -18,18 +19,33 @@ Staff_side::set_staffsym(Staff_symbol* s_l) Staff_side::Staff_side(Staff_elem * elem_l) { + inter_f_ = 2 PT; + staff_size_i_ = 0; + staff_sym_l_=0; elem_l_ = elem_l; dir_i_ =0; - staff_sym_l_ =0; inside_staff_b_ =false; } +void +Staff_side::read_staff_sym() +{ + if (! staff_sym_l_) + return ; + inter_f_ = staff_sym_l_->inter_note_f(); + staff_size_i_ = staff_sym_l_->steps_i(); +} + Interval Staff_side::support_height() const return r; { + for (int i=0; i < support_l_arr_.size(); i++) r.unite(support_l_arr_[i]->height()); + if (r.empty_b()) { + r = Interval(0,0); + } } void @@ -42,45 +58,35 @@ Staff_side::add_support(Staff_elem*i) int Staff_side::get_position_i()const { - if (!staff_sym_l_) - return 0; + ((Staff_side*)this)->read_staff_sym(); if (!dir_i_) { - warning("Staff_side::get_position_i(): returning -20"); + warning("Staff_side::get_position_i(): " + "somebody forgot to set my vertical direction, returning -20"); return -20; } - Real inter_f = staff_sym_l_->inter_note_f(); - int staff_size_i = staff_sym_l_->steps_i(); + Real y=0; if (!inside_staff_b_) { - y = (dir_i_ > 0) ? staff_size_i + 2: -2; - y *=inter_f; + y = (dir_i_ > 0) ? staff_size_i_ + 2: -2; + y *=inter_f_; Interval v= support_height(); if (dir_i_ > 0) { - y = y >? (v.max() + 2*inter_f); + y = y >? (v.max() + 2*inter_f_); } else if (dir_i_ < 0) { - y = y inter_note_f(); - int i= get_position_i(); - return i+ int(rint(- sym_dim[dir_i_] / inter_f)); + return i+ int(rint(- sym_dim[dir_i_] / inter_f_)); }