2 crescendo.cc -- implement Crescendo
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include "crescendo.hh"
13 #include "paper-def.hh"
16 Crescendo::Crescendo()
20 left_dyn_b_ = right_dyn_b_ =false;
24 Crescendo::brew_molecule_p() const
28 Real absdyn_dim = 10 PT; // ugh
31 Real w_dim = width().length();
34 x_off_dim += absdyn_dim;
41 warning("Crescendo too small");
44 Real lookup_wid = w_dim * 0.9; // make it slightly smaller.
46 Symbol s( paper()->lookup_l()->hairpin( lookup_wid, grow_dir_i_ < 0) );
48 int pos = get_position_i(s.dim.y);
49 m_p->translate(Offset(x_off_dim + 0.05 * w_dim,
50 pos * paper()->internote_f()));
54 IMPLEMENT_STATIC_NAME(Crescendo);
55 IMPLEMENT_IS_TYPE_B1(Crescendo,Spanner);