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