]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/stencil.scm
remove spurious else
[lilypond.git] / scm / stencil.scm
index 65852fc305a0ba9469784a69372886d6e0a14251..a457087b15913aaced436bf96942c702853e7bd3 100644 (file)
@@ -55,7 +55,12 @@ a list of @var{paddings}."
       empty-stencil
       (fold
        (lambda (next padding front)
-         (ly:stencil-stack front axis dir next padding))
+         (let ((offset (+ (- (interval-end (ly:stencil-extent front axis))
+                             (interval-start (ly:stencil-extent next axis)))
+                          padding)))
+           (ly:stencil-add
+             front
+             (ly:stencil-translate-axis next offset axis))))
        (car stils)
        (cdr stils)
        paddings)))
@@ -246,16 +251,16 @@ the partial ellipse until 7*PI/2.  For example, in pseudo-code:
 \n((0.0 . 2) (PI/2 . 3) (PI . -2) (3*PI/2 . -3)\
 \n(2*PI . 2) (5*PI/2 . 3) (3*PI . -2) (7*PI/2 . -3))
 "
-    (apply append
-           (map (lambda (adder)
-                  (map (lambda (quadrant)
-                         (cons (+ adder (car quadrant))
-                               (cdr quadrant)))
-                       `((0.0 . (,x-radius . 0.0))
-                         (,PI-OVER-TWO . (0.0 . ,y-radius))
-                         (,PI . (,(- x-radius) . 0.0))
-                         (,THREE-PI-OVER-TWO . (0.0 . ,(- y-radius))))))
-                `(0.0 ,TWO-PI))))
+    (append-map
+     (lambda (adder)
+       (map (lambda (quadrant)
+              (cons (+ adder (car quadrant))
+                    (cdr quadrant)))
+            `((0.0 . (,x-radius . 0.0))
+              (,PI-OVER-TWO . (0.0 . ,y-radius))
+              (,PI . (,(- x-radius) . 0.0))
+              (,THREE-PI-OVER-TWO . (0.0 . ,(- y-radius))))))
+     `(0.0 ,TWO-PI)))
 
   (define
     (insert-in-ordered-list ordering-function value inlist cutl? cutr?)
@@ -304,7 +309,7 @@ then reduce using @var{min-max}:
 "
     (reduce min-max
             (if (eq? min-max min) 100000 -100000)
-            (map (lambda (x) (side x)) l)))
+            (map side l)))
 
   (let*
       (;; the outside limit of the x-radius
@@ -459,12 +464,12 @@ respectively."
                        x))
                     pointlist))
          ;; a path must begin with a `moveto'
-         (prepend-origin (apply list (cons 'moveto origin) path))
+         (prepend-origin (cons (cons 'moveto origin) path))
          ;; if this path is connected, add closepath to the end
          (final-path (if connect
-                         (append prepend-origin (list 'closepath))
+                         (append prepend-origin (list '(closepath)))
                          prepend-origin))
-         (command-list (fold-right append '() final-path)))
+         (command-list (concatenate final-path)))
     (ly:make-stencil
      `(path ,thickness
             `(,@',command-list)
@@ -647,12 +652,12 @@ with optional arrows of @code{max-size} on start and end controlled by
          (null (cons 0 0))
          (arrow-1
           (ly:make-stencil
-           `(polygon (quote ,(concatenate (map complex-to-offset p1s)))
+           `(polygon (quote ,(append-map complex-to-offset p1s))
                      0.0
                      #t) null null))
          (arrow-2
           (ly:make-stencil
-           `(polygon (quote ,(concatenate (map complex-to-offset p2s)))
+           `(polygon (quote ,(append-map complex-to-offset p2s))
                      0.0
                      #t) null null ) )
          (thickness (min (/ distance 12) 0.1))