2 rest.cc -- implement Rest
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "paper-def.hh"
14 #include "axis-group-element.hh"
15 #include "paper-score.hh"
16 #include "staff-symbol-referencer.hh"
20 Rest::after_line_breaking ()
22 if (balltype_i () == 0)
24 Staff_symbol_referencer_interface si (this);
25 si.set_position (si.position_f () + 2);
29 if (d && balltype_i () > 4) // UGH.
34 staff_symbol_referencer (d)
35 .set_position ((balltype_i () == 7) ? 4 : 3);
41 Rest::do_brew_molecule () const
45 if (balltype_i () == 0 || balltype_i () == 1)
47 Staff_symbol_referencer_interface si(this);
48 ledger_b = abs(si.position_f () - (2* balltype_i () - 1))
53 SCM style_sym =get_elt_property ("style");
54 if (balltype_i () >= 2 &&gh_string_p ( style_sym))
56 style = ly_scm2string (style_sym);
59 String idx = ("rests-") + to_str (balltype_i ()) + (ledger_b ? "o" : "") + style;
61 return lookup_l ()->afm_find (idx);