]> git.donarmstrong.com Git - lilypond.git/blob - item.cc
release: 0.0.5
[lilypond.git] / item.cc
1 #include "line.hh"
2 #include "symbol.hh"
3 #include "molecule.hh"
4 #include "pcol.hh"
5
6 String
7 Spanner::TeXstring() const
8 {
9     assert(right->line);
10     Real w = left->hpos - right->hpos;
11     return strets->eval(w).tex;
12 }
13
14 Spanner *
15 Spanner::broken_at(const PCol *c1, const PCol *c2) const
16 {
17     Spanner *sp = new Spanner(*this);
18     sp->left = c1;
19     sp->right = c2;
20     return sp;
21 }
22
23 Spanner::Spanner()
24 {
25     pstaff_=0;
26     strets=0;
27     left = right = 0;
28 }
29
30 /****************************************************************/
31 String
32 Item::TeXstring() const
33 {
34     return output->TeXstring();
35 }
36
37 Interval
38 Item::width() const
39 {
40     return output->extent().x;
41 }
42
43 Interval
44 Item::height() const
45 {
46     return output->extent().y;
47 }
48
49 /****************************************************************/
50
51 Item::Item()
52 {
53     col = 0;
54     output = 0;
55     pstaff_ = 0;
56 }
57 void
58 Item::print() const
59 {
60     output->print();
61 }