]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 784.
authorJoe Neeman <joeneeman@gmail.com>
Thu, 7 Jan 2010 02:28:54 +0000 (13:28 +1100)
committerJoe Neeman <joeneeman@gmail.com>
Thu, 7 Jan 2010 03:47:06 +0000 (14:47 +1100)
Use staff-spaces to compute the skylines for dot-columns rather
than the extent of the note-heads.

input/regression/dot-column-note-collision.ly [new file with mode: 0644]
lily/dot-column.cc

diff --git a/input/regression/dot-column-note-collision.ly b/input/regression/dot-column-note-collision.ly
new file mode 100644 (file)
index 0000000..a03bfcb
--- /dev/null
@@ -0,0 +1,9 @@
+\version "2.13.10"
+
+\header {
+  texidoc = "Dots and note-heads should not collide."
+}
+
+{
+  <f' g'>4. s8 \small <f' g'>4. s8 <g' a'>4. s8 <a' b'>4. s8
+}
index 345e47f7d981680f577af67ae52a9bafbd3484e3..cfbb92895ccdae58c2ac1be55f00b981f0a0f767 100644 (file)
@@ -110,12 +110,17 @@ Dot_column::calc_positioning_done (SCM smob)
          y.add_point (y1);
          y.add_point (y2);
        }
+      else if (Note_head::has_interface (s))
+       y = Interval (-1, 1);
       else
-       y = s->extent (s, Y_AXIS);
+       {
+         programming_error ("unknown grob in dot col support");
+         continue;
+       }
 
       y *= 2 / ss;
       y += Staff_symbol_referencer::get_position (s);
-         
+
       Box b (s->extent (commonx, X_AXIS), y);
       boxes.push_back (b);
 
@@ -133,7 +138,7 @@ Dot_column::calc_positioning_done (SCM smob)
          Interval y = flag.extent (Y_AXIS)
            * (2 / ss)
            + Stem::stem_end_position (stem);
-                 
+
          Interval x = stem->relative_coordinate (commonx, X_AXIS)
            + flag.extent (X_AXIS);