summaryrefslogtreecommitdiff
path: root/item.cc
blob: 96ec8a890a4c7ed742d2c6b23bb50c612f992975 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "line.hh"
#include "symbol.hh"
#include "molecule.hh"
#include "pcol.hh"

String
Spanner::TeXstring() const
{
    assert(right->line);
    Real w = left->hpos - right->hpos;
    return strets->eval(w).tex;
}

Spanner *
Spanner::broken_at(const PCol *c1, const PCol *c2) const
{
    Spanner *sp = new Spanner(*this);
    sp->left = c1;
    sp->right = c2;
    return sp;
}

Spanner::Spanner()
{
    pstaff_=0;
    strets=0;
    left = right = 0;
}

/****************************************************************/
String
Item::TeXstring() const
{
    return output->TeXstring();
}

Interval
Item::width() const
{
    return output->extent().x;
}

Interval
Item::height() const
{
    return output->extent().y;
}

/****************************************************************/

Item::Item()
{
    col = 0;
    output = 0;
    pstaff_ = 0;
}
void
Item::print() const
{
    output->print();
}