2 crescendo.cc -- implement Crescendo
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "crescendo.hh"
11 #include "paper-def.hh"
14 Crescendo::Crescendo()
19 left_dyn_b_ = right_dyn_b_ =false;
23 Crescendo::do_break_at(PCol*, PCol*)const
25 return new Crescendo(*this);
30 Crescendo::brew_molecule_p() const
34 Real absdyn_dim = 10 PT; // ugh
37 Real w_dim = width().length();
40 x_off_dim += absdyn_dim;
47 error("Crescendo too small");
50 Real lookup_wid = w_dim * 0.9; // make it slightly smaller.
52 Symbol s( paper()->lookup_l()->hairpin( lookup_wid, grow_dir_i_ < 0) );
54 int pos = get_position_i(s.dim.y);
55 m_p->translate(Offset(x_off_dim + 0.05 * w_dim,
56 pos * paper()->internote()));
60 IMPLEMENT_STATIC_NAME(Crescendo);