From: hanwen Date: Sun, 13 Nov 2005 01:43:55 +0000 (+0000) Subject: * lily/tie-column-format.cc (set_chord_outline): add dots into X-Git-Tag: release/2.7.20~66 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2245259d3164807e5940ca48c1379b1ce92dab01;p=lilypond.git * 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 --- diff --git a/ChangeLog b/ChangeLog index 74da84f853..9908496107 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-11-13 Han-Wen Nienhuys + + * 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 * stepmake/stepmake/texinfo-vars.make (GENERATE_OMF): use diff --git a/lily/tie-column-format.cc b/lily/tie-column-format.cc index bde9073652..255899c5d2 100644 --- a/lily/tie-column-format.cc +++ b/lily/tie-column-format.cc @@ -15,6 +15,7 @@ #include "item.hh" #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" +#include "rhythmic-head.hh" #include @@ -56,7 +57,6 @@ set_chord_outline (Array *skyline, Real staff_space = Staff_symbol_referencer::staff_space (bounds[0]); Array boxes; - Interval x_union; Grob *stem = 0; for (int i = 0; i < bounds.size (); i++) @@ -74,7 +74,17 @@ set_chord_outline (Array *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); diff --git a/lily/tie.cc b/lily/tie.cc index 7588cc33ed..a0b8213f2d 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -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);