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;
21 inside_staff_b_
= false;
25 Crescendo::symbol_height() const
27 return get_symbol().dim_
[Y_AXIS
];
30 static Real absdyn_dim
= 10 PT
; // ugh
33 Crescendo::get_symbol() const
35 Real w_dim
= width().length ();
36 if (dyn_b_drul_
[LEFT
])
40 if (dyn_b_drul_
[RIGHT
])
47 warning ("Crescendo too small");
51 return Atom (paper()->lookup_l ()->hairpin (w_dim
, grow_dir_
< 0));
55 Crescendo::brew_molecule_p() const
59 if (dyn_b_drul_
[LEFT
])
60 x_off_dim
+= absdyn_dim
;
63 Atom
s (get_symbol());
65 m_p
->translate (Offset (x_off_dim
, pos_i_
* paper()->internote_f ()));
70 IMPLEMENT_IS_TYPE_B1(Crescendo
,Spanner
);