X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fclef-engraver.cc;h=44b8be7cba363f994cc9509347142efe82e94de5;hb=02861542ddbae022658890bdd44720e4a00cce3b;hp=c2e671216b678de4b3104d5bc691457b5b5a629f;hpb=1fc55f384b7be38162ff82b1eb86ca0449346f87;p=lilypond.git diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index c2e671216b..44b8be7cba 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2002 Han-Wen Nienhuys , + (c) 1997--2003 Han-Wen Nienhuys , Mats Bengtsson */ @@ -11,16 +11,13 @@ #include #include "translator-group.hh" - #include "bar-line.hh" #include "staff-symbol-referencer.hh" - #include "engraver.hh" #include "direction.hh" #include "side-position-interface.hh" #include "item.hh" - class Clef_engraver : public Engraver { public: @@ -65,8 +62,8 @@ Clef_engraver::set_glyph () SCM basic = ly_symbol2scm ("Clef"); - daddy_trans_->execute_single_pushpop_property (basic, glyph_sym, SCM_UNDEFINED); - daddy_trans_->execute_single_pushpop_property (basic, glyph_sym, glyph); + daddy_trans_->execute_pushpop_property (basic, glyph_sym, SCM_UNDEFINED); + daddy_trans_->execute_pushpop_property (basic, glyph_sym, glyph); } /** @@ -82,7 +79,6 @@ Clef_engraver::acknowledge_grob (Grob_info info) if (Bar_line::has_interface (info.grob_) && gh_string_p (get_property ("clefGlyph"))) create_clef (); - } } @@ -105,12 +101,18 @@ Clef_engraver::create_clef () { Item * g = new Item (get_property ("OctavateEight")); + int abs_oct = gh_scm2int (oct) ; + int dir = sign (abs_oct); + abs_oct = abs (abs_oct) + 1; + + g->set_grob_property ("text", + scm_number_to_string (gh_int2scm (abs_oct), + SCM_MAKINUM (10))); Side_position_interface::add_support (g,clef_); g->set_parent (clef_, Y_AXIS); g->set_parent (clef_, X_AXIS); - - g->set_grob_property ("direction", scm_int2num (sign (gh_scm2int (oct)))); + g->set_grob_property ("direction", scm_int2num (dir)); octavate_ = g; announce_grob(octavate_, SCM_EOL); } @@ -134,8 +136,7 @@ Clef_engraver::inspect_clef_properties () || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F - || to_boolean (force_clef) -) + || to_boolean (force_clef)) { set_glyph (); create_clef ();