blob: 3e582511e937d99b002faa49ca207c811288a6c6 (
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
|
/*
rest.cc -- implement Rest
source file of the LilyPond music typesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
#include "duration.hh"
#include "rest.hh"
#include "dimen.hh"
#include "debug.hh"
#include "paper-def.hh"
#include "lookup.hh"
#include "molecule.hh"
#include "rest.hh"
Rest::Rest(Duration d)
{
balltype = d.type_i_;
dots = d.dots_i_;
pos_i_ = 0;
}
IMPLEMENT_STATIC_NAME(Rest);
void
Rest::do_print()const
{
#ifndef NPRINT
mtor << "Rest "<<balltype<< "dots " << dots;
Item::print();
#endif
}
Molecule*
Rest::brew_molecule_p()const
{
Paper_def *p =paper();
Symbol s;
s = p->lookup_l()->rest(balltype);
Molecule *m = new Molecule(Atom(s));
if (dots) {
Symbol d =p->lookup_l()->dots(dots);
Molecule dm;
dm.add(Atom(d));
m->add_right(dm);
}
m->translate(Offset(0,pos_i_ * paper()->internote()));
return m;
}
|