X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstem.cc;h=7a63f20b7c5eeb0e5d6a8f023f11ca07faadc34e;hb=c5f04d22f8ad2b8735c6cfec69b8138f185752af;hp=3e096be996b77bbb7d80e9e91c043d0b93ef78be;hpb=1b4f371fe85ccdf1a5e5670cf5626426bd05d82b;p=lilypond.git diff --git a/lily/stem.cc b/lily/stem.cc index 3e096be996..7a63f20b7c 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996--2002 Han-Wen Nienhuys + (c) 1996--2003 Han-Wen Nienhuys Jan Nieuwenhuizen TODO: This is way too hairy @@ -418,10 +418,8 @@ Stem::position_noteheads (Grob*me) bool invisible = invisible_b (me); - Real thick = 0.0; - if (invisible) - thick = gh_scm2double (me->get_grob_property ("thickness")) - * me->get_paper ()->get_var ("linethickness"); + Real thick = gh_scm2double (me->get_grob_property ("thickness")) + * me->get_paper ()->get_var ("linethickness"); Grob *hed = support_head (me); @@ -446,10 +444,16 @@ Stem::position_noteheads (Grob*me) Real l = Note_head::head_extent (heads[i], X_AXIS).length (); Direction d = get_direction (me); - heads[i]->translate_axis (l * d, X_AXIS); + /* reversed head should be shifted l-thickness, but this looks + too crowded, so we only shift l-0.5*thickness. + Notice that this leads to assymetry: Normal heads overlap + the stem 100% whereas reversed heads only overlaps the stem + 50% */ + #define magic 0.5 + heads[i]->translate_axis ((l-thick*magic) * d, X_AXIS); if (invisible_b(me)) - heads[i]->translate_axis (-thick *2* d , X_AXIS); + heads[i]->translate_axis (-thick*(2-magic) * d , X_AXIS); /* TODO: @@ -945,6 +949,6 @@ Stem::beam_multiplicity (Grob *stem) ADD_INTERFACE (Stem,"stem-interface", "A stem", - "up-to-staff avoid-note-head adjust-if-on-staffline thickness stem-info beamed-lengths beamed-minimum-free-lengths beamed-extreme-minimum-free-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head note-heads direction length flag-style no-stem-extend stroke-style"); + "french-beaming up-to-staff avoid-note-head adjust-if-on-staffline thickness stem-info beamed-lengths beamed-minimum-free-lengths beamed-extreme-minimum-free-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head note-heads direction length flag-style no-stem-extend stroke-style");