]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4601/2: Let \shape use grob-transformer like \offset does
authorDavid Kastrup <dak@gnu.org>
Wed, 9 Sep 2015 15:29:52 +0000 (17:29 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 17 Sep 2015 07:53:18 +0000 (09:53 +0200)
ly/music-functions-init.ly

index fe270aef98d4d58cb226252cf96a174652000a5b..e976cb66440498876a627e339fc194e0bbd35441 100644 (file)
@@ -1616,15 +1616,11 @@ control-point.  If @var{item} is a string, the result is
 @code{\\once\\override} for the specified grob type.  If @var{item} is
 a music expression, the result is the same music expression with an
 appropriate tweak applied.")
-   (define (shape-curve grob)
+   (define (shape-curve grob coords)
      (let* ((orig (ly:grob-original grob))
             (siblings (if (ly:spanner? grob)
                           (ly:spanner-broken-into orig) '()))
-            (total-found (length siblings))
-            (function (assoc-get 'control-points
-                                 (reverse (ly:grob-basic-properties grob))))
-            (coords (function grob)))
-
+            (total-found (length siblings)))
        (define (offset-control-points offsets)
          (if (null? offsets)
              coords
@@ -1647,7 +1643,9 @@ appropriate tweak applied.")
        (if (>= total-found 2)
            (helper siblings offsets)
            (offset-control-points (car offsets)))))
-   (once (propertyTweak 'control-points shape-curve item)))
+   (once (propertyTweak 'control-points
+                        (grob-transformer 'control-points shape-curve)
+                        item)))
 
 shiftDurations =
 #(define-music-function (dur dots arg)