Reviewers: ,

Message:
Please don't run regtests yet on this patch - it is up to see if people
are OK with this approach.  It is a brute-force approach that will slow
down lilypond for slurs that have extra-object-collisions, but I think
it'll cover the grand majority of cases.

Description:
Sketch for fix of issue 307

Please review this at http://codereview.appspot.com/4813048/

Affected files:
  M lily/slur-scoring.cc


Index: lily/slur-scoring.cc
diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc
index 63160a99171872556acb773a43bc046b773ebdce..81b3bac7996183fa6643fe54d96de179b07ac595 100644
--- a/lily/slur-scoring.cc
+++ b/lily/slur-scoring.cc
@@ -263,11 +263,27 @@ Slur_score_state::fill (Grob *me)
   Drul_array<Real> end_ys
     = get_y_attachment_range ();

+  extra_encompass_infos_ = get_extra_encompass_infos ();
+
+  Drul_array<bool> extra_encompass_dirs (false,false);
+  for (vsize i = 0; i < extra_encompass_infos_.size (); i++)
+    {
+      Direction d = get_grob_direction (extra_encompass_infos_[i].grob_);
+      if (d)
+        extra_encompass_dirs[d] = true;
+    }
+  if (extra_encompass_dirs[dir_])
+    {
+      Direction d = LEFT;
+      do
+        end_ys[d] += 2.0; // m4g1c
+      while (flip (&d) != LEFT);
+    }
+
   configurations_ = enumerate_attachments (end_ys);
   for (vsize i = 0; i < columns_.size (); i++)
     encompass_infos_.push_back (get_encompass_info (columns_[i]));

-  extra_encompass_infos_ = get_extra_encompass_infos ();
   valid_ = true;

   musical_dy_ = 0.0;



_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to