X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcol-info.cc;h=fa87a8f65396ede486210bdb89d5646ba04fb372;hb=1b071315c1d318e46035ec8bc0b73da55a025ae8;hp=e54d421b3a2330093297ff24959ccc9766099943;hpb=6ce61146edb1c36647b514778c29cdc9beedab6a;p=lilypond.git diff --git a/lily/col-info.cc b/lily/col-info.cc index e54d421b3a..fa87a8f653 100644 --- a/lily/col-info.cc +++ b/lily/col-info.cc @@ -1,9 +1,9 @@ /* - col-info.cc -- implement Colinfo + col-info.cc -- implement Column_info source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1999 Han-Wen Nienhuys */ #include "p-col.hh" @@ -11,31 +11,62 @@ #include "debug.hh" void -Colinfo::print() const +Column_info::print() const { #ifndef NPRINT - mtor << "column { "; - if (fixed()) - mtor << "fixed at " << fixed_position()<<", "; - assert(pcol_l_); - mtor << "[" << minleft() << ", " << minright() << "]"; - mtor <<"}\n"; + DOUT << "column { "; + if (fixed_b()) + DOUT << "fixed at " << fixed_position() << ", "; + assert (pcol_l_); + DOUT << width_.str(); + Direction d = LEFT; + do { + for (int i=0; i < rods_[d].size (); i++) + rods_[d][i].print (); + } while (flip (&d) != LEFT); + + DOUT <<"}\n"; #endif } -Colinfo::Colinfo(PCol *col_l, Real const *fixed_C) +Column_info::Column_info (Paper_column *col_l, Real const *fixed_C) { - if (fixed_C) - fixpos_p_.set_l(fixed_C); - ugh_b_ = false; - pcol_l_ = col_l; - width = pcol_l_->width(); + if (fixed_C) + fixpos_p_.set_l (fixed_C); + ugh_b_ = false; + pcol_l_ = col_l; + width_ = pcol_l_->extent(X_AXIS); + if (width_.empty_b()) + width_ = Interval(0,0); } -Colinfo::Colinfo() +Column_info::Column_info() { - ugh_b_ = false; - pcol_l_ =0; + ugh_b_ = false; + pcol_l_ =0; } +bool +Column_info::fixed_b () const +{ + return fixpos_p_.get_C(); +} + +Real +Column_info::fixed_position () const +{ + return *fixpos_p_; +} + +int +Column_info::rank_i () const +{ + return pcol_l_->rank_i (); +} + +void +Spacer_rod::print ()const +{ + DOUT << "Other " << other_idx_ << "dist = " << distance_f_ << '\n'; +}