From 12c24eeb6dc1f4291ca925992e5a16e3360b1b25 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:06:24 +0000 Subject: [PATCH] lilypond-1.5.38 --- Documentation/regression-test.tely | 2 ++ flower/include/interval.hh | 19 +++++++++++++------ input/regression/spacing-bar-stem.ly | 23 +++++++++++++++++++++++ lily/separating-line-group-engraver.cc | 3 ++- 4 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 input/regression/spacing-bar-stem.ly diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 3eef351526..36cacbfb90 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -253,6 +253,8 @@ Grace note do weird things with timing. Fragile. @lilypondfile[printfilename]{prefatory-spacing-matter.ly} +@lilypondfile[printfilename]{spacing-bar-stem.ly} + @c @l ilypondfile[printfilename]{spacing-tight.ly} diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 5a1d3c49af..8d4d83a5dc 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -49,7 +49,8 @@ struct Interval_t : public Drul_array { set_empty (); } Interval_t (T m, T M) : Drul_array (m,M) - {} + { + } Interval_t &operator -= (T r) { *this += -r; return *this; @@ -65,11 +66,9 @@ struct Interval_t : public Drul_array { { elem (LEFT) *= r; elem (RIGHT) *= r; - if (r < T (0)) { - T t = elem (LEFT); - elem (LEFT) = elem (RIGHT); - elem (RIGHT) = t; - } + if (r < T (0)) + swap(); + } return *this; } @@ -86,6 +85,14 @@ struct Interval_t : public Drul_array { elem (LEFT) = l; elem (RIGHT) =r; } +private: + + void swap () + { + T t = elem (LEFT); + elem (LEFT) = elem (RIGHT); + elem (RIGHT) = t; + } }; diff --git a/input/regression/spacing-bar-stem.ly b/input/regression/spacing-bar-stem.ly new file mode 100644 index 0000000000..946628b167 --- /dev/null +++ b/input/regression/spacing-bar-stem.ly @@ -0,0 +1,23 @@ +\header { +texidoc = "Downstem notes following a barline are +printed with some extra space. This is an optical correction similar +to juxtaposed stems. + +Accidentals after the barline get some space as well. +" +} + +sd = \property Voice.Stem \set #'direction = #-1 +su = \property Voice.Stem \set #'direction = #1 +\score { \notes\relative c'' +{ + +%\property Staff.StaffSpacing \override #'stem-spacing-correction = #10 +%\property Staff.NoteSpacing \override #'stem-spacing-correction = #10 + +\time 1/4 \sd c4 \su c4 +\sd c4 \su c4 +\sd f c,4 c'4 cis4 \stemUp c4 +} +\paper { linewidth = -1. } +} diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 8c38cc0c26..796821254b 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -166,7 +166,7 @@ Separating_line_group_engraver::stop_translation_timestep () break_malt_p_ =0; } - + if (Item * sp = current_spacings_.staff_spacing_) { /* @@ -180,6 +180,7 @@ Separating_line_group_engraver::stop_translation_timestep () typeset_grob (sp); } + if (!current_spacings_.empty ()) { last_spacings_ = current_spacings_; -- 2.39.5