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 dyn_b_drul_[LEFT] = dyn_b_drul_[RIGHT] =false;
24 Crescendo::symbol_height() const
26 return get_symbol().dim_[Y_AXIS];
29 static Real absdyn_dim = 10 PT; // ugh
32 Crescendo::get_symbol() const
34 Real w_dim = width().length ();
35 if (dyn_b_drul_[LEFT])
39 if (dyn_b_drul_[RIGHT])
46 warning (_("Crescendo too small"));
50 return Atom (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0));
54 Crescendo::brew_molecule_p() const
58 if (dyn_b_drul_[LEFT])
59 x_off_dim += absdyn_dim;
62 Atom s (get_symbol());
64 m_p->translate (Offset (x_off_dim, y_));
69 IMPLEMENT_IS_TYPE_B1(Crescendo,Spanner);