lilypond-1.5.9
[lilypond.git] / src / spanner.cc
blobcc57686393455e9fe4f1cad6196b2315586b2551
1 #include "debug.hh"
2 #include "spanner.hh"
3 #include "pcol.hh"
7 void
8 Spanner::do_print()const
10 mtor << " (unknown) ";
13 Spanner*
14 Spanner::broken_at(PCol*c1, PCol *c2)const
16 Spanner *span_p = do_break_at(c1,c2);
18 for (int i=0; i < dependants.size(); i++) {
19 dependants[i]->substitute_dependency((Staff_elem*)this, span_p);
22 span_p->left = c1;
23 span_p->right = c2;
25 return span_p;
28 Spanner::Spanner()
30 left = right = 0;
34 Interval
35 Spanner::width()const
37 Real r = right->hpos;
38 Real l = left->hpos;
39 assert(*left < *right);
40 assert(r>=l);
42 return Interval(0, r-l);