]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.64.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 26 Jun 2000 21:07:57 +0000 (23:07 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 26 Jun 2000 21:07:57 +0000 (23:07 +0200)
1.3.64.jcn3
============

* Fixed non-broken interstaff slurs.

CHANGES
VERSION
lily/slur.cc
scm/slur.scm

diff --git a/CHANGES b/CHANGES
index 5247911f003678e6d54916cb204612be7124bff9..5892454adf4acc716e1aff04fbb4d070792de6b1 100644 (file)
--- 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 da5de0f78112e8d1ad499990dc02fc264e018692..e6b8fc902b0c5b785af113eb44f2e3b6e9264ba3 100644 (file)
--- 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.
index 3ca85469ceee0c78f39a57ecc0a1dd33157308f7..43235b758b9f02e525bfca8cbdc4938e523fbeec 100644 (file)
@@ -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<Stem*> (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<Note_column> 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")))
index 13a756b3b91f6e07b6df0ae160354504e0952865..c21ae76db46b2ee00b883092a105fb7e5402ac55 100644 (file)
@@ -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<Item*> 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))))
 
     ;; 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)
     ))