From: fred Date: Sun, 24 Mar 2002 19:53:09 +0000 (+0000) Subject: lilypond-0.1.7 X-Git-Tag: release/1.5.59~4156 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0f7308da5a13a37657370684abdd3032e4b5d033;p=lilypond.git lilypond-0.1.7 --- diff --git a/lily/head-column.cc b/lily/head-column.cc index d08519a891..2d978bb60e 100644 --- a/lily/head-column.cc +++ b/lily/head-column.cc @@ -10,6 +10,7 @@ #include "head-column.hh" #include "note-head.hh" #include "stem.hh" +#include "script.hh" Head_column::Head_column() { @@ -36,9 +37,18 @@ void Head_column::set(Stem*stem_l) { stem_l_ = stem_l; - add_dependency(stem_l); + Score_elem::add_dependency(stem_l); + for (int i=0; script_l_arr_.size(); i++) + script_l_arr_[i]->set_stem( stem_l ); } +void +Head_column::add(Script *script_l) +{ + Script_column::add(script_l) ; + if (stem_l_ ) + script_l->set_stem( stem_l_ ); +} void Head_column::add(Note_head *n_l) { diff --git a/lily/include/boxes.hh b/lily/include/boxes.hh index 22a2eec3a5..8161a84518 100644 --- a/lily/include/boxes.hh +++ b/lily/include/boxes.hh @@ -9,19 +9,28 @@ #include "real.hh" #include "interval.hh" #include "offset.hh" +#include "axes.hh" -/// a square subset of Real^2 struct Box { - Interval x, y; - + Interval interval_a_[NO_AXES]; + + Interval &x() {return interval_a_[X_AXIS]; } + Interval &y(){ return interval_a_[Y_AXIS]; } + Interval x()const{ return interval_a_[X_AXIS]; } + Interval y()const{return interval_a_[Y_AXIS]; } + Interval operator[](Axis a ) { + return interval_a_[a]; + } + void translate(Offset o) { - x.translate(o.x); - y.translate(o.y); + x().translate(o.x()); + y().translate(o.y()); } + /// smallest box enclosing #b# void unite(Box b) { - x.unite(b.x); - y.unite(b.y); + x().unite(b.x()); + y().unite(b.y()); } Box(); Box(Interval ix, Interval iy); diff --git a/lily/lookup.cc b/lily/lookup.cc index 6bc298e147..e51a3e8b89 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -109,7 +109,7 @@ Lookup::bar(String s, Real h) const a.push(print_dimen( h)); Symbol ret=(*symtables_)("bars")->lookup(s);; ret.tex = substitute_args(ret.tex, a); - ret.dim.y = Interval( 0, h); + ret.dim.y() = Interval( 0, h); return ret; } @@ -183,7 +183,7 @@ Lookup::hairpin(Real &wid, bool decresc) const Array a; a.push(idx); ret.tex = substitute_args(ret.tex, a); - ret.dim.x = Interval(0,wid); + ret.dim.x() = Interval(0,wid); return ret; } @@ -192,9 +192,8 @@ Lookup::linestaff(int lines, Real wid) const { Real internote_f = paper_l_ ->internote_f(); Symbol s; - s.dim.x = Interval(0,wid); Real dy = (lines >0) ? (lines-1)*internote_f : 0; - s.dim.y = Interval(0,dy); + s.dim = Box(Interval(0,wid), Interval(0,dy)); Array a; a.push(lines); @@ -211,8 +210,8 @@ Symbol Lookup::meter(Array a) const { Symbol s; - s.dim.x = Interval( 0 PT, 10 PT); - s.dim.y = Interval(0, 20 PT); // todo + s.dim.x() = Interval( 0 PT, 10 PT); + s.dim.y() = Interval(0, 20 PT); // todo String src = (*symtables_)("param")->lookup("meter").tex; s.tex = substitute_args(src,a); return s; @@ -229,8 +228,8 @@ Lookup::stem(Real y1,Real y2) const } Symbol s; - s.dim.x = Interval(0,0); - s.dim.y = Interval(y1,y2); + s.dim.x() = Interval(0,0); + s.dim.y() = Interval(y1,y2); Array a; a.push(print_dimen(y1)); @@ -263,7 +262,7 @@ Lookup::vbrace(Real &y) const Array a; a.push(idx); s.tex = substitute_args(s.tex,a); - s.dim.y = Interval(0,y); + s.dim.y() = Interval(0,y); } { Array a; diff --git a/lily/score-align-grav.cc b/lily/score-align-grav.cc index babf47bd32..9660c144ed 100644 --- a/lily/score-align-grav.cc +++ b/lily/score-align-grav.cc @@ -22,7 +22,7 @@ void Score_align_engraver::do_pre_move_processing() { if (align_p_) { - typeset_breakable_item( align_p_); + typeset_element( align_p_); align_p_ =0; } } @@ -34,10 +34,13 @@ Score_align_engraver::acknowledge_element(Score_elem_info inf) if (!align_p_ ) { align_p_ = new Horizontal_group_item; + align_p_->breakable_b_ = true; announce_element(Score_elem_info(align_p_,0)); } - - align_p_->add_element(inf.elem_l_); + Score_elem * unbound_elem = inf.elem_l_; + while ( unbound_elem->axis_group_l_a_[X_AXIS] ) + unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS]; + align_p_->add_element(unbound_elem ); } }