2 bow.cc -- implement Bow
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "paper-def.hh"
15 left_pos_i_ = right_pos_i_ = 0;
16 left_dx_f_ = right_dx_f_ = 0.0;
23 int dy = right_pos_i_-left_pos_i_;
25 Real w = width().length();
27 return Offset(w/2,dy * paper()->internote());
31 Bow::brew_molecule_p() const
33 Molecule*output = new Molecule;
34 Real w = width().length();
36 int dy = right_pos_i_ - left_pos_i_;
38 Real nw_f = paper()->note_width();
39 Real nh_f = paper()->internote();
42 w+= (right_dx_f_ - left_dx_f_) * nw_f ;
43 Real round_w = w; // slur lookup rounds the slurwidth .
45 Symbol sl = paper()->lookup_l()->slur(dy , round_w, dir_i_);
47 Real error = w-round_w;
50 a.translate(Offset((left_dx_f_ + 0.5 )*nw_f + error/2,
56 IMPLEMENT_STATIC_NAME(Bow);