5 #include "paper-def.hh"
8 #include "musical-request.hh"
12 Notehead::Notehead(int ss)
23 Notehead::set_rhythmic(Rhythmic_req*r_req_l)
25 balltype = r_req_l->duration_.type_i_;
26 dots = r_req_l->duration_.dots_i_;
29 IMPLEMENT_STATIC_NAME(Notehead);
32 Notehead::do_print()const
35 mtor << "balltype "<< balltype << ", position = "<< position
42 Notehead::compare(Notehead *const &a, Notehead * const &b)
44 return a->position - b->position;
48 Notehead::brew_molecule_p() const return out;
50 Paper_def *p = paper();
52 Real dy = p->internote();
53 Symbol s = p->lookup_l()->ball(balltype);
55 out = new Molecule(Atom(s));
57 Symbol d = p->lookup_l()->dots(dots);
61 dm.translate(Offset(0,dy));
64 out->translate(Offset(x_dir * p->note_width(),0));
65 bool streepjes = (position<-1)||(position > staff_size+1);
67 int dir = sign(position);
68 int s =(position<-1) ? -((-position)/2): (position-staff_size)/2;
69 Symbol str = p->lookup_l()->streepjes(s);
73 sm.translate(Offset(0,-dy* dir));
77 out->translate(Offset(0,dy*position));