From c0fbdba16af8aebb8c6cb2f46bb3bb9499f4ee9a Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 26 Jun 2000 23:07:57 +0200 Subject: [PATCH] patch::: 1.3.64.jcn3 1.3.64.jcn3 ============ * Fixed non-broken interstaff slurs. --- CHANGES | 5 +++++ VERSION | 2 +- lily/slur.cc | 31 ++++++++++++++++++++++++++----- scm/slur.scm | 15 --------------- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/CHANGES b/CHANGES index 5247911f00..5892454adf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +1.3.64.jcn3 +============ + +* Fixed non-broken interstaff slurs. + 1.3.64.jcn2 ============ diff --git a/VERSION b/VERSION index da5de0f781..e6b8fc902b 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=64 -MY_PATCH_LEVEL=jcn2 +MY_PATCH_LEVEL=jcn3 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/slur.cc b/lily/slur.cc index 3ca85469ce..43235b758b 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -11,7 +11,9 @@ [TODO] * begin and end should be treated as a/acknowledge Scripts. * broken slur should have uniform trend - * smart changing of endings and offsets to avoid ugly beziers. + * smart changing of endings + * smart changing of (Y-?)offsets to avoid ugly beziers + (along-side-stem) */ #include "directional-element-interface.hh" @@ -235,6 +237,7 @@ Slur::get_attachment (Direction dir) const { SCM s = get_elt_property ("attachment"); SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s); + String str = ly_symbol2string (a); Real ss = Staff_symbol_referencer_interface (this).staff_space (); Real hs = ss / 2.0; Offset o; @@ -242,7 +245,6 @@ Slur::get_attachment (Direction dir) const { if (Stem* st = dynamic_cast (n->stem_l ())) { - String str = ly_symbol2string (a); if (str == "head") { o = Offset (0, st->chord_start_f ()); @@ -297,7 +299,20 @@ Slur::get_attachment (Direction dir) const } } } - + + + /* + URG + */ + + if (str != "loose-end") + { + Link_array encompass_arr = + Pointer_group_interface__extract_elements (this, (Note_column*)0, + "note-columns"); + o -= Offset (0, calc_interstaff_dist (dir == LEFT ? encompass_arr[0] + : encompass_arr.top (), this)); + } return o; } @@ -337,11 +352,15 @@ Slur::get_encompass_offset_arr () const left is broken edge */ int cross_count = cross_staff_count (); + + /* + URG + */ bool cross_b = cross_count && cross_count < encompass_arr.size (); if (encompass_arr[0] != get_bound (LEFT)) { first--; - Real is = calc_interstaff_dist (encompass_arr[0], this); + Real is = calc_interstaff_dist (encompass_arr[0], this); if (cross_b) offset_arr[0][Y_AXIS] += is; } @@ -452,7 +471,9 @@ Slur::get_curve () const Bezier b; int i = 0; - if (!directional_element (this).get ()) + // URGURG? + if (!directional_element (this).get () + || ! gh_symbol_p (index_cell (get_elt_property ("attachment"), LEFT))) ((Slur*)this)->set_extremities (); if (!gh_pair_p (get_elt_property ("control-points"))) diff --git a/scm/slur.scm b/scm/slur.scm index 13a756b3b9..c21ae76db4 100644 --- a/scm/slur.scm +++ b/scm/slur.scm @@ -1,14 +1,4 @@ -;;; als aan echte stok -;;; if ((note_column_drul[d] == get_bound (d)) -;;; && note_column_drul[d]->first_head () -;;; && (note_column_drul[d]->stem_l ())) -;;; -;;; *Need: Score_elment::pointer_alist_ -;;; Score_elment::property_alist_ -;;; Spanner::Drul_array spanned_drul_; -;;; spanner:: (cons get_bound (LEFT) get_bound (RIGHT)) - (define (attached-to-stem slur dir) (let* ((note-columns (get-pointer slur 'note-columns)) (col (if (= dir 1) (car note-columns) (car (reverse note-columns)))) @@ -50,11 +40,6 @@ ;; default case, attach to head ((lambda (x y) #t) . head) - - ;; silly rule, just to check - ((lambda (slur dir) - (and (attached-to-stem slur dir) - (= (get-property slur 'direction) dir))) . stem) )) -- 2.39.5