5 #include "paper-def.hh"
8 #include "musicalrequest.hh"
12 Notehead::Notehead(int ss
)
23 Notehead::set_rhythmic(Rhythmic_req
*r_req_l
)
25 balltype
= r_req_l
->balltype
;
30 Notehead::do_print()const
33 mtor
<< "balltype "<< balltype
<< ", position = "<< position
40 Notehead::compare(Notehead
*const &a
, Notehead
* const &b
)
42 return a
->position
- b
->position
;
46 Notehead::brew_molecule_p() const return out
;
48 Paper_def
*p
= paper();
50 Real dy
= p
->internote();
51 Symbol s
= p
->lookup_p_
->ball(balltype
);
53 out
= new Molecule(Atom(s
));
55 Symbol d
= p
->lookup_p_
->dots(dots
);
59 dm
.translate(Offset(0,dy
));
62 out
->translate(Offset(x_dir
* p
->note_width(),0));
63 bool streepjes
= (position
<-1)||(position
> staff_size
+1);
65 int dir
= sign(position
);
66 int s
=(position
<-1) ? -((-position
)/2): (position
-staff_size
)/2;
67 Symbol str
= p
->lookup_p_
->streepjes(s
);
71 sm
.translate(Offset(0,-dy
* dir
));
75 out
->translate(Offset(0,dy
*position
));