5 #include "paper-def.hh"
8 #include "musical-request.hh"
12 Notehead::Notehead(int ss)
24 Notehead::set_rhythmic(Rhythmic_req*r_req_l)
26 balltype = r_req_l->duration_.type_i_;
27 dots = r_req_l->duration_.dots_i_;
30 IMPLEMENT_STATIC_NAME(Notehead);
33 Notehead::do_print()const
38 mtor << "balltype "<< balltype << ", position = "<< position
45 Notehead::compare(Notehead *const &a, Notehead * const &b)
47 return a->position - b->position;
51 Notehead::brew_molecule_p() const return out;
53 Paper_def *p = paper();
55 Real dy = p->internote();
58 s = p->lookup_l()->ball(balltype);
60 s = p->lookup_l()->rest(balltype);
62 out = new Molecule(Atom(s));
64 Symbol d = p->lookup_l()->dots(dots);
68 dm.translate(Offset(0,dy));
71 out->translate(Offset(x_dir * p->note_width(),0));
72 bool streepjes = (position<-1)||(position > staff_size+1);
74 int dir = sign(position);
75 int s =(position<-1) ? -((-position)/2): (position-staff_size)/2;
76 Symbol str = p->lookup_l()->streepjes(s);
80 sm.translate(Offset(0,-dy* dir));
84 out->translate(Offset(0,dy*position));