1 #include "staffline.hh"
2 #include "scoreline.hh"
6 #include "paper-def.hh"
14 Real r
= (i
.empty()) ? 0.0 : i
.length();
15 String
s("\\vbox to ");
17 s
+= "{\\vskip "+print_dimen(i
.right
)+" ";
23 Line_of_staff::TeXstring() const
25 String
s("%line_of_staff\n");
27 s
+=make_vbox(height());
28 // the staff itself: eg lines, accolades
31 iter_top(line_of_score_l_
->cols
,cc
);
32 Real lastpos
=cc
->hpos
;
34 // all items in the current line & staff.
35 for (; cc
.ok(); cc
++) {
36 Real delta
=cc
->hpos
- lastpos
;
41 s
+=String( "\\kern ") + print_dimen(delta
);
43 // now output the items.
44 for (iter_top(cc
->its
,i
); i
.ok(); i
++) {
45 if (i
->pstaff_l_
== pstaff_l_
)
49 for (iter_top(cc
->starters
,i
); i
.ok(); i
++)
50 if (i
->pstaff_l_
== pstaff_l_
)
58 Line_of_staff::Line_of_staff(Line_of_score
* sc
, PStaff
*st
)
63 PCol
*linestart
= sc
->cols
.top();
64 PCol
*linestop
= sc
->cols
.bottom();
66 for (iter_top(pstaff_l_
->spans
,i
); i
.ok(); i
++) {
67 PCol
*brokenstart
= &max(*linestart
, *i
->left
);
68 PCol
*brokenstop
= &min(*linestop
, *i
->right
);
69 if ( *brokenstart
< *brokenstop
) {
70 Spanner
*span_p
=i
->broken_at(brokenstart
,brokenstop
);
71 line_of_score_l_
->pscore_l_
-> // higghl
79 Line_of_staff::height() const
83 iter_top(line_of_score_l_
->cols
,cc
);
85 // all items in the current line & staff.
86 for (; cc
.ok(); cc
++) {
87 for (iter_top(cc
->its
,i
); i
.ok(); i
++) {
88 if (i
->pstaff_l_
== pstaff_l_
)
93 for (iter_top(cc
->starters
,i
); i
.ok(); i
++)
94 if (i
->pstaff_l_
== pstaff_l_
) {
103 Line_of_staff::process()
106 if (!pstaff_l_
->stafsym_p_
)
107 pstaff_l_
->brew_molecule_p(line_of_score_l_
->pscore_l_
->
108 paper_l_
->linewidth
);