2 rest.cc -- implement Rest
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "paper-def.hh"
14 #include "axis-group-element.hh"
15 #include "paper-score.hh"
18 Rest::do_add_processing ()
21 set_position (position_f () + 2);
23 Rhythmic_head::do_add_processing ();
27 Rest::do_post_processing ()
29 Rhythmic_head::do_post_processing ();
31 && balltype_i_ > 4) // UGH.
37 dots_l_->set_position (4);
39 dots_l_->set_position (3);
45 Rest::do_brew_molecule_p () const
49 if (balltype_i_ == 0 || balltype_i_ == 1)
50 ledger_b = abs(position_f () - (2* balltype_i_ - 1)) > lines_i ();
54 SCM style_sym =get_elt_property ("style");
55 if (balltype_i_ >= 2 && style_sym != SCM_UNDEFINED)
57 style = ly_scm2string (style_sym);
60 String idx = ("rests-") + to_str (balltype_i_) + (ledger_b ? "o" : "") + style;
62 return new Molecule(lookup_l ()->afm_find (idx));