]> git.donarmstrong.com Git - lilypond.git/blob - spanner.cc
release: 0.0.7
[lilypond.git] / spanner.cc
1
2 #include "spanner.hh"
3 #include "line.hh"
4
5 #include "symbol.hh"
6 #include "molecule.hh"
7 #include "pcol.hh"
8
9 String
10 Spanner::TeXstring() const
11 {
12     assert(right->line);
13     Real w = left->hpos - right->hpos;
14     return strets->eval(w).tex;
15 }
16
17 Spanner *
18 Spanner::broken_at(const PCol *c1, const PCol *c2) const
19 {
20     Spanner *sp = new Spanner(*this);
21     sp->left = c1;
22     sp->right = c2;
23     return sp;
24 }
25
26 Spanner::Spanner()
27 {
28     pstaff_=0;
29     strets=0;
30     left = right = 0;
31 }
32