From 51ac7b992ecd6e1f17fa46eaa9f772f2b0c1947f Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:27:18 +0000 Subject: [PATCH] lilypond-0.0.21 --- src/staffline.cc | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/staffline.cc b/src/staffline.cc index c3e33fff06..7bd534fb97 100644 --- a/src/staffline.cc +++ b/src/staffline.cc @@ -30,7 +30,7 @@ Line_of_staff::TeXstring() const brew_molecule(line_of_score_->pscore_->paper_->linewidth); s+=pstaff_->stafsym->TeXstring(); - PCursor cc(line_of_score_->cols); + iter_top(line_of_score_->cols,cc); Real lastpos=cc->hpos; // all items in the current line & staff. @@ -44,14 +44,14 @@ Line_of_staff::TeXstring() const // now output the items. - for (PCursor ic(cc->its); ic.ok(); ic++) { - if (ic->pstaff_ == pstaff_) - s += ic->TeXstring(); + for (iter_top(cc->its,i); i.ok(); i++) { + if (i->pstaff_ == pstaff_) + s += i->TeXstring(); } // spanners. - for (PCursor sc(cc->starters); sc.ok(); sc++) - if (sc->pstaff_ == pstaff_) - s += sc->TeXstring(); + for (iter_top(cc->starters,i); i.ok(); i++) + if (i->pstaff_ == pstaff_) + s += i->TeXstring(); } } s+="\\hss}\\vss}"; @@ -66,13 +66,14 @@ Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st) PCol *linestart = sc->cols.top(); PCol *linestop = sc->cols.bottom(); - for (PCursor sp(pstaff_->spans); sp.ok(); sp++) { + for (iter_top(pstaff_->spans,i); i.ok(); i++) { - PCol *brokenstart = &max(*linestart, *sp->left); - PCol *brokenstop = &min(*linestop, *sp->right); + PCol *brokenstart = &max(*linestart, *i->left); + PCol *brokenstop = &min(*linestop, *i->right); if ( *brokenstart < *brokenstop) { + Spanner*span_p =i->broken_at(brokenstart,brokenstop); line_of_score_->pscore_-> // higghl - add_broken(sp->broken_at(brokenstart,brokenstop)); + add_broken(span_p); } } } @@ -81,26 +82,23 @@ Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st) Interval Line_of_staff::height() const { - Interval y; - { - y = pstaff_->stafsym->extent().y; - } - PCursor cc(line_of_score_->cols); + Interval y = pstaff_->stafsym->extent().y; + iter_top(line_of_score_->cols,cc); // all items in the current line & staff. for (; cc.ok(); cc++) { - for (PCursor ic(cc->its); ic.ok(); ic++) { - if (ic->pstaff_ == pstaff_) { - y.unite(ic->height()); - } + for (iter_top(cc->its,i); i.ok(); i++) { + if (i->pstaff_ == pstaff_) + y.unite(i->height()); + } // spanners. - for (PCursor sc(cc->starters); sc.ok(); sc++) - if (sc->pstaff_ == pstaff_) { - y.unite(sc->height()); + for (iter_top(cc->starters,i); i.ok(); i++) + if (i->pstaff_ == pstaff_) { + y.unite(i->height()); } - } } + return y; } -- 2.39.5