--- /dev/null
+\header {
+
+ texidoc = "in collisions, the stems of outer voice are added to the
+ dot support of the inner voices."
+
+}
+
+\version "2.11.21"
+
+\layout { ragged-right = ##t }
+
+\new Staff {
+ \key e \major \time 3/4
+ \relative c'' {
+ << { dis4. } \\
+ { fis,4 } \\ { b4 } >>
+ }
+}
Rest collisions should wait after line breaking.
*/
+ Interval y;
if (Rest::has_interface (s))
{
base_x.unite (s->extent (commonx, X_AXIS));
continue;
}
+ else if (Stem::has_interface (s))
+ {
+ Real y1 = Stem::head_positions (s)[-get_grob_direction (s)];
+ Real y2 = y1 + get_grob_direction (s) * 7;
+
+ y.add_point (y1);
+ y.add_point (y2);
+ }
+ else
+ y = s->extent (s, Y_AXIS);
- Interval y = s->extent (s, Y_AXIS);
y *= 2 / ss;
y += Staff_symbol_referencer::get_position (s);
Box b (s->extent (commonx, X_AXIS), y);
boxes.push_back (b);
- if (Grob *s = unsmob_grob (s->get_object ("stem")))
- stems.insert (s);
+ if (Grob *stem = unsmob_grob (s->get_object ("stem")))
+ stems.insert (stem);
}
for (set<Grob*>::const_iterator i(stems.begin());
static void set_dotcol (Grob *me, Grob *);
static void add_head (Grob *me, Grob *);
static bool has_rests (Grob *me);
+ static Grob *dot_column (Grob *me);
DECLARE_GROB_INTERFACE();
static Item *get_stem (Grob *);
}
while ((flip (&d)) != UP);
+
+ /*
+ see input/regression/dot-up-voice-collision.ly
+ */
+ for (vsize i = 0; i < clash_groups[UP].size (); i++)
+ {
+ Grob *g = clash_groups[UP][i];
+ Grob *dc = Note_column::dot_column (g);
+
+ if (dc)
+ for (vsize j = i + 1; j < clash_groups[UP].size (); j++)
+ {
+ Grob *stem = Note_column::get_stem (clash_groups[UP][j]);
+ Side_position_interface::add_support (dc, stem);
+ }
+ }
+
/*
Check if chords are meshing
*/
return acc;
}
+Grob *
+Note_column::dot_column (Grob *me)
+{
+ extract_grob_set (me, "note-heads", heads);
+ for (vsize i = 0; i < heads.size (); i++)
+ {
+ Grob *dots = unsmob_grob (heads[i]->get_object ("dot"));
+ if (dots)
+ return dots->get_parent (X_AXIS);
+ }
+
+ return 0;
+}
+
Grob *
Note_column::arpeggio (Grob *me)
{