}
}
+ full_collide = full_collide || (close_half_collide
+ && distant_half_collide);
+
Drul_array<Real> center_note_shifts;
center_note_shifts[LEFT] = 0.0;
center_note_shifts[RIGHT] = 0.0;
Real shift_amount = 1;
- bool touch = (ups[0] - dps.top () >= 0);
+ bool touch = (ups[0] >= dps.top ());
if (touch)
shift_amount *= -1;
/* For full collisions, the right hand head may obscure dots, so
make sure the dotted heads go to the right. */
- if (Rhythmic_head::dot_count (nu) > Rhythmic_head::dot_count (nd)
- && full_collide)
- shift_amount = 1;
-
+ bool stem_to_stem = false;
+ if (full_collide)
+ if (Rhythmic_head::dot_count (nu) > Rhythmic_head::dot_count (nd))
+ shift_amount = 1;
+ else if (Rhythmic_head::dot_count (nu) < Rhythmic_head::dot_count (nd))
+ stem_to_stem = true;
+
if (merge_possible)
{
shift_amount = 0;
if (wipe_ball->live ())
{
wipe_ball->set_grob_property ("transparent", SCM_BOOL_T);
- wipe_ball->set_grob_property ("molecule", SCM_EOL);
+ wipe_ball->set_grob_property ("stencil", SCM_EOL);
if (Grob *d = unsmob_grob (wipe_ball->get_grob_property ("dot")))
d->suicide ();
}
/* TODO: these numbers are magic; should devise a set of grob props
to tune this behavior. */
+ else if (stem_to_stem)
+ shift_amount *= -0.65;
else if (close_half_collide && !touch)
shift_amount *= 0.52;
else if (distant_half_collide && !touch)
SCM autos (automatic_shift (me, cg));
SCM hand (forced_shift (me));
-
-
Direction d = UP;
Real wid = 0.0;
if(cg[d].size())
{
Grob *h = cg[d][0];
- wid = Note_column::first_head(h)->extent(h,X_AXIS).length() ;
+ wid = Note_column::first_head (h)->extent (h,X_AXIS).length() ;
}
}
-
while (flip (&d) != UP);
-
Link_array<Grob> done;
for (; gh_pair_p (hand); hand =ly_cdr (hand))
ADD_INTERFACE (Note_collision_interface, "note-collision-interface",
- "An object that handles collisions between notes with different stem "
-"directions and horizontal shifts. Most of the interesting properties "
-"are to be set in @ref{note-column-interface}: these are "
-"@code{force-hshift} and @code{horizontal-shift}. ",
- "merge-differently-dotted merge-differently-headed positioning-done");
+ "An object that handles collisions between notes with different stem "
+ "directions and horizontal shifts. Most of the interesting properties "
+ "are to be set in @ref{note-column-interface}: these are "
+ "@code{force-hshift} and @code{horizontal-shift}."
+
+ ,
+
+ "merge-differently-dotted merge-differently-headed positioning-done");