]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.38
authorfred <fred>
Wed, 27 Mar 2002 02:06:24 +0000 (02:06 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:06:24 +0000 (02:06 +0000)
Documentation/regression-test.tely
flower/include/interval.hh
input/regression/spacing-bar-stem.ly [new file with mode: 0644]
lily/separating-line-group-engraver.cc

index 3eef351526ff2852b6491940bafbedae19baf0ae..36cacbfb90231fb52a0158ce68debfc2b2d8ec2e 100644 (file)
@@ -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}
 
index 5a1d3c49af90579f95c01de586f5b757a96d9a19..8d4d83a5dc7381960a169cb83c971897f658f2ec 100644 (file)
@@ -49,7 +49,8 @@ struct Interval_t : public Drul_array<T> {
     set_empty ();
   }
   Interval_t (T m, T M) : Drul_array<T> (m,M)
-    {}
+    {
+    }
   Interval_t<T> &operator -= (T r) {
     *this += -r;
     return *this;
@@ -65,11 +66,9 @@ struct Interval_t : public Drul_array<T> {
       {
        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<T> {
     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 (file)
index 0000000..946628b
--- /dev/null
@@ -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. }
+}
index 8c38cc0c269856c84bc8abacdbd3071c51f46652..796821254b95bf8734c4dc94d9fcd6d56f399968 100644 (file)
@@ -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_;