]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/tie-column-format.cc (set_chord_outline): add dots into
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 13 Nov 2005 01:43:55 +0000 (01:43 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 13 Nov 2005 01:43:55 +0000 (01:43 +0000)
skyline extents. This fixes tie formatting if the left head has dots.

* lily/tie.cc (get_configuration): only shift tie by a whole staff
space inside the staff.
(get_configuration): shift another position if necessary in case
of left head tie

ChangeLog
lily/tie-column-format.cc
lily/tie.cc

index 74da84f853b4914d23c1fcea235ff6a5745d5030..99084961077ed94fe691d51b167ad10c18a966a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-13  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/tie-column-format.cc (set_chord_outline): add dots into
+       skyline extents. This fixes tie formatting if the left head has dots.
+
+       * lily/tie.cc (get_configuration): only shift tie by a whole staff
+       space inside the staff.
+       (get_configuration): shift another position if necessary in case
+       of left head tie  
+
 2005-11-12  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * stepmake/stepmake/texinfo-vars.make (GENERATE_OMF): use
index bde9073652ed65c46a8154f88fb4cd7c98d4ced5..255899c5d278174c4a0ff141ceba8c49e6dc8fd6 100644 (file)
@@ -15,6 +15,7 @@
 #include "item.hh"
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
+#include "rhythmic-head.hh"
 
 #include <set>
 
@@ -56,7 +57,6 @@ set_chord_outline (Array<Skyline_entry> *skyline,
   Real staff_space = Staff_symbol_referencer::staff_space (bounds[0]);
 
   Array<Box> boxes;
-  Interval x_union;
 
   Grob *stem = 0;
   for (int i = 0; i < bounds.size (); i++)
@@ -74,7 +74,17 @@ set_chord_outline (Array<Skyline_entry> *skyline,
 
       Interval x = head->extent (common, X_AXIS);
       boxes.push (Box (x, y));
-      x_union.unite (x);
+
+      Grob *dots = Rhythmic_head::get_dots (head);
+      if (d == LEFT && dots)
+       {
+         Interval x = dots->extent (common, X_AXIS);
+         Interval y (-0.5, 0.5);
+         y.translate (Staff_symbol_referencer::get_position (dots));
+         y *= staff_space * 0.5;
+         
+         boxes.push (Box (x, y));
+       }
     }
 
   (*skyline) = empty_skyline (-d);
index 7588cc33ed61823e073b876105c186ad058111d8..a0b8213f2d363e375b2739e43fa767b61426c81e 100644 (file)
@@ -277,6 +277,12 @@ Tie::get_configuration (Grob *me_grob, Grob *common,
       conf->position_ += conf->dir_;
       in_space = !in_space;
 
+      if (conf->position_ == dot_pos)
+       {
+         conf->position_ += conf->dir_;
+         in_space = !in_space;
+       }
+      
       if (skylines)
        {
          Real y = staff_space * 0.5 * conf->position_;
@@ -469,6 +475,15 @@ Tie::calc_control_points (SCM smob)
   // trigger Tie-column
   (void)  get_grob_direction (me);
 
+  Grob *yparent = me->get_parent (Y_AXIS);
+  if (Tie_column::has_interface (yparent)
+      && unsmob_grob_array (yparent->get_object ("ties"))
+      && unsmob_grob_array (yparent->get_object ("ties"))->size () > 1)
+    {
+      /* trigger positioning. */
+      (void) yparent->get_property ("positioning-done");
+    }
+
   if (!scm_is_pair (me->get_property ("control-points")))
     {
       set_default_control_points (me);