]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/stencil.scm
* The grand 2005-2006 replace.
[lilypond.git] / scm / stencil.scm
index 4cc57b39fde0e2317592205fbb02c6090d9956a7..1aff0c12ff09ef8cd8b65fb0c650f2597eadd7c4 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2003--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 2003--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 (define-public (stack-stencils axis dir padding stils)
   "Stack stencils STILS in direction AXIS, DIR, using PADDING."
@@ -129,6 +129,7 @@ encloses the contents.
                            (list (real-part z) (imag-part z))))
        
        (z-dest (+ (* e_x (car destination)) (* e_y (cdr destination))))
+       (e_z (/ z-dest (magnitude z-dest)))
        (triangle-points '(-1+0.25i
                          0
                          -1-0.25i))
@@ -149,10 +150,16 @@ encloses the contents.
         `(polygon (quote ,(concatenate (map complex-to-offset p2s)))
                   0.0
                   #t) null null ) )
+       (thickness 0.1)
+       (shorten-line 0.5)
+       (start (complex-to-offset (/ (* e_z shorten-line) 2)))
+       (end (complex-to-offset (- z-dest (/ (* e_z shorten-line) 2))))
+       
        (line (ly:make-stencil
-             `(draw-line 0.1 0 0
-                         ,(car destination)
-                         ,(cdr destination))
+             `(draw-line ,thickness
+                         ,(car start) ,(cadr start)
+                         ,(car end) ,(cadr end)
+                         )
              (cons (min 0 (car destination))
                    (min 0 (cdr destination)))
              (cons (max 0 (car destination))