1 #include "staffline.hh"
2 #include "scoreline.hh"
13 String s("\\vbox to ");
14 s += print_dimen(i.length());
15 s += "{\\vskip "+print_dimen(i.max)+" ";
21 Line_of_staff::TeXstring() const
23 String s("%line_of_staff\n");
24 s+=make_vbox(height());
25 // the staff itself: eg lines, accolades
28 Symbol sym = pstaff_->get_stafsym(scor->score->paper_->linewidth);
30 PCursor<const PCol *> cc(scor->cols);
31 Real lastpos=cc->hpos;
33 // all items in the current line & staff.
34 for (; cc.ok(); cc++) {
35 Real delta=cc->hpos - lastpos;
40 s +=String( "\\kern ") + print_dimen(delta);
42 // now output the items.
44 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
45 if (ic->pstaff_ == pstaff_)
49 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
50 if (sc->pstaff_ == pstaff_)
58 Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
63 const PCol *linestart = sc->cols.top();
64 const PCol *linestop = sc->cols.bottom();
66 for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
67 const PCol *brokenstart = &MAX(*linestart, *sp->left);
68 const PCol *brokenstop = &MIN(*linestop, *sp->right);
69 // if (*brokenstop < *brokenstart)
70 brokenspans.bottom().add(sp->broken_at(0,0));
73 for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
75 brokenspans.bottom().add(sp->broken_at(0,0));
81 Line_of_staff::height() const
85 Symbol s = pstaff_->stafsym->eval(scor->score->paper_->linewidth);
88 PCursor<const PCol *> cc(scor->cols);
90 // all items in the current line & staff.
91 for (; cc.ok(); cc++) {
92 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
93 if (ic->pstaff_ == pstaff_) {
94 y.unite(ic->height());
98 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
99 if (sc->pstaff_ == pstaff_) {
100 y.unite(sc->height());