2 rod.cc -- implement Rod, Column_rod
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "paper-column.hh"
12 #include "dimensions.hh"
13 #include "single-malt-grouping-item.hh"
19 item_l_drul_[LEFT] = item_l_drul_[RIGHT] =0;
23 Column_rod::print () const
26 DEBUG_OUT << "Column_rod { rank = "
27 << other_l_->rank_i () << ", dist = " << distance_f_ << "}\n";
31 Column_rod::Column_rod ()
38 Column_rod::compare (const Column_rod &r1, const Column_rod &r2)
40 return r1.other_l_->rank_i() - r2.other_l_->rank_i();
47 Drul_array<Paper_column*> cols;
48 Real extra_dist = 0.0;
50 cols[d] = item_l_drul_[d]->column_l ();
51 extra_dist += item_l_drul_[d]->relative_coordinate (cols[d], X_AXIS);
52 } while ((flip (&d))!=LEFT);
54 if (cols[LEFT] != cols[RIGHT])
57 cols[-d]->add_rod(cols[d], distance_f_ + extra_dist);
59 while ((flip (&d))!=LEFT);