From f4ff2e488239d66830ac8b3ae5771358a917b58f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 30 Oct 2004 17:36:18 +0000 Subject: [PATCH] (enumerate_attachments): use stem_extent_ for attaching, fixes slur/stem left attachment of downslur/downstem. --- ChangeLog | 4 ++++ input/regression/new-slur.ly | 6 ++++- input/regression/quote.ly | 1 + input/regression/rhythmic-staff.ly | 5 +++-- input/regression/slur-area.ly | 35 ----------------------------- input/regression/slur-attachment.ly | 23 ------------------- lily/slur-scoring.cc | 9 ++++---- 7 files changed, 17 insertions(+), 66 deletions(-) delete mode 100644 input/regression/slur-area.ly delete mode 100644 input/regression/slur-attachment.ly diff --git a/ChangeLog b/ChangeLog index 49ad00c3fc..b17fa9ec4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-10-30 Han-Wen Nienhuys + * lily/slur-scoring.cc (enumerate_attachments): use stem_extent_ + for attaching, fixes slur/stem left attachment of + downslur/downstem. + * lily/quote-iterator.cc (process): use <= for comparisons. Fixes quote problem if for last note of quoted sequence. diff --git a/input/regression/new-slur.ly b/input/regression/new-slur.ly index 8d26f5458d..4ae1122024 100644 --- a/input/regression/new-slur.ly +++ b/input/regression/new-slur.ly @@ -63,9 +63,13 @@ e4( dis4) g='16( b d fis) \clef bass a=8[ e16(f] g[ a b d,)] s4 | \break - e=8( f] g[ a b d,)] s4 | \break + e=8[( f] g[ a b d,)] s4 | \clef treble + \new Voice { + \slurDown + c=''4( d, c') s4 + } \new Voice \relative c'' { \slurDown f2( d4 f | g c a f | d c f2 | f1) | } diff --git a/input/regression/quote.ly b/input/regression/quote.ly index f633c5db3c..dd0dd1e970 100644 --- a/input/regression/quote.ly +++ b/input/regression/quote.ly @@ -28,6 +28,7 @@ original = \relative c'' { c8 d s2 es8 gis8 } \original } \new Staff \relative c'' << + \set Staff.instrument = "orig+quote" \set Staff.quotedEventTypes = #'(note-event articulation-event) \original \new Voice { diff --git a/input/regression/rhythmic-staff.ly b/input/regression/rhythmic-staff.ly index bb321df3b0..80c67a8b34 100644 --- a/input/regression/rhythmic-staff.ly +++ b/input/regression/rhythmic-staff.ly @@ -2,8 +2,9 @@ \header { - texidoc = "In rhythmic staves stems should go up, and bar lines have the size for a 5 line staff. The whole note hangs from the rhythmic staff." -} + texidoc = "In rhythmic staves stems should go up, and bar lines +have the size for a 5 line staff. The whole rest hangs from the +rhythmic staff." } \layout { raggedright = ##t } diff --git a/input/regression/slur-area.ly b/input/regression/slur-area.ly deleted file mode 100644 index 8f60aa2337..0000000000 --- a/input/regression/slur-area.ly +++ /dev/null @@ -1,35 +0,0 @@ - -\version "2.3.22" -\header { - - texidoc = "The area underneath an (up) slur is minimised to improve the shape. " - -} - -\score{ -\relative c''{ - -\slurUp -\stemDown -a(a' a, a) -a(a a' a,) -a(d a a) -a(a d a) - -e'8(e e e e e e e) -a,8(d a a a a a a) -a(a a a a a d a) - -c,(g' c e f d b g) -c,(g' c e f d b g) - -\set autoBeaming = ##f -\stemUp -a8(a a a a a a a) - -} -\layout{ -indent=0.0\mm -} -} - diff --git a/input/regression/slur-attachment.ly b/input/regression/slur-attachment.ly deleted file mode 100644 index 0016c11841..0000000000 --- a/input/regression/slur-attachment.ly +++ /dev/null @@ -1,23 +0,0 @@ - -\version "2.3.22" - -\header{ -texidoc=" -Slurs should be attached to note heads, except when they would collide -with beams. -" -} -\score{ - \relative c''{ - \override Slur #'direction = #1 - a8( a a4) - a4( a8 a) - a8 a(a4) - a4( a8) a - } - \layout{ - indent = 0.0 - linewidth = 100.\mm - } -} - diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc index 8543c9e904..48799e2e0f 100644 --- a/lily/slur-scoring.cc +++ b/lily/slur-scoring.cc @@ -619,15 +619,14 @@ Slur_score_state::enumerate_attachments (Drul_array end_ys) const { Interval stem_y = extremes_[d].stem_extent_[Y_AXIS]; stem_y.widen (0.25 * staff_space_); - if (dir_ == -d - && stem_y.contains (os[d][Y_AXIS])) + if (stem_y.contains (os[d][Y_AXIS])) { - os[d][X_AXIS] = extremes_[d].slur_head_extent_[-d] + os[d][X_AXIS] = extremes_[d].stem_extent_[X_AXIS][-d] - d * 0.3; attach_to_stem[d] = true; } - else if (dir_ *extremes_[d].stem_extent_[Y_AXIS][dir_] - < dir_ * os[d][Y_AXIS] + else if (dir_ * extremes_[d].stem_extent_[Y_AXIS][dir_] + < dir_ * os[d][Y_AXIS] && !extremes_[d].stem_extent_[X_AXIS].is_empty () ) -- 2.39.2