2 bow.cc -- implement Bow
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "paper-def.hh"
11 #include "molecule.hh"
16 dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0;
17 dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
24 Real dy = dy_f_drul_[RIGHT]-dy_f_drul_[LEFT];
26 Real w = width().length ();
28 return Offset (w/2,dy );
33 Bow::brew_molecule_p() const
35 Molecule*output = new Molecule;
36 Real w = width().length ();
38 Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
40 Real nw_f = paper()->note_width ();
41 Real nh_f = paper()->internote_f ();
43 w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
44 Real round_w = w; // slur lookup rounds the slurwidth .
46 Atom a = paper()->lookup_l ()->slur (dy_f, round_w, dir_);
48 Real error = w-round_w;
49 a.translate (Offset ((dx_f_drul_[LEFT] + 0.5*nw_f)
57 IMPLEMENT_IS_TYPE_B1(Bow,Directional_spanner);