X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Frest.cc;h=2c9c91eff56083e1af632ca54b2e0ce00b6cb32d;hb=refs%2Ftags%2Frelease%2F1.1.43;hp=0c527bd9ba8d9595f6d8d13bc51031645937b43f;hpb=afa5829cd270e1b0c616b7ba5c5e6cdc0e920e5f;p=lilypond.git diff --git a/lily/rest.cc b/lily/rest.cc index 0c527bd9ba..2c9c91eff5 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1999 Han-Wen Nienhuys */ #include "molecule.hh" @@ -17,15 +17,15 @@ void Rest::do_add_processing () { - if (balltype_i_ > 1) - position_i_ -= 4; - else if (balltype_i_ == 0) + if (balltype_i_ == 0) position_i_ += 2; Rhythmic_head::do_add_processing (); - if (dots_l_ && balltype_i_ > 1) + if (dots_l_ && balltype_i_ > 4) { - dots_l_->position_i_ = position_i_ + 4; + dots_l_->position_i_ = position_i_ + 3; + if (balltype_i_ == 7) + dots_l_->position_i_++; } } @@ -37,13 +37,23 @@ Rest::Rest () Molecule * Rest::do_brew_molecule_p () const { - int staff_size_i_ = 8; - bool streepjes_b = abs(position_i_) > staff_size_i_ /2 && - (balltype_i_ == 0 || balltype_i_ == 1); + bool ledger_b =false; + + if (balltype_i_ == 0 || balltype_i_ == 1) + ledger_b = abs(position_i_ - (2* balltype_i_ - 1)) > lines_i (); + + + + String style; + SCM style_sym =get_elt_property (style_scm_sym); + if (style_sym != SCM_BOOL_F) + { + style = ly_scm2string (SCM_CDR(style_sym)); + } - Atom s(lookup_l ()->rest (balltype_i_, streepjes_b)); - Molecule * m = new Molecule ( Atom (s)); - m->translate_axis (position_i_ * paper ()->internote_f (), Y_AXIS); + Molecule s(lookup_l ()->rest (balltype_i_, ledger_b, style)); + Molecule * m = new Molecule ( Molecule (s)); + m->translate_axis (position_i_ * staff_line_leading_f ()/2.0, Y_AXIS); return m; }