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 left_pos_i_ = right_pos_i_ = 0;
17 left_dx_f_ = right_dx_f_ = 0.0;
24 int dy = right_pos_i_-left_pos_i_;
26 Real w = width().length();
28 return Offset(w/2,dy * paper()->internote_f());
33 Bow::brew_molecule_p() const
35 Molecule*output = new Molecule;
36 Real w = width().length();
38 int dy = right_pos_i_ - left_pos_i_;
40 Real nw_f = paper()->note_width();
41 Real nh_f = paper()->internote_f();
44 w+= (right_dx_f_ - left_dx_f_) * nw_f ;
45 Real round_w = w; // slur lookup rounds the slurwidth .
47 Symbol sl = paper()->lookup_l()->slur(dy , round_w, dir_i_);
49 Real error = w-round_w;
52 a.translate(Offset((left_dx_f_ + 0.5 )*nw_f + error/2,
58 IMPLEMENT_STATIC_NAME(Bow);