]> git.donarmstrong.com Git - lilypond.git/commitdiff
Correct dot placement on elongated fret-diagrams
authorCarl Sorensen <c_sorensen@byu.edu>
Sat, 1 Nov 2008 03:18:43 +0000 (21:18 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Sat, 1 Nov 2008 03:18:43 +0000 (21:18 -0600)
Modify draw-dots to remove fret-range from the argument
list.
Modify first call to draw dots from make-fret-diagram so
that fret-count is calculated from fret-range.

scm/fret-diagrams.scm

index d0c48821044d5e12791b3a451fc265f2c2cd676a..5e713e5d712258f89523db347471dda98e861d35 100644 (file)
@@ -163,7 +163,7 @@ Line thickness is given by @var{th}, fret & string spacing by
          (- size th)))))
 
 (define (draw-dots layout props string-count fret-count
-                   fret-range size finger-code
+                   size finger-code
                    dot-position dot-radius dot-thickness dot-list orientation)
   "Make dots for fret diagram."
 
@@ -246,7 +246,7 @@ Line thickness is given by @var{th}, fret & string spacing by
         labeled-dot-stencil
         (ly:stencil-add
          (draw-dots
-          layout props string-count fret-count fret-range size finger-code
+          layout props string-count fret-count size finger-code
           dot-position dot-radius dot-thickness restlist orientation)
          labeled-dot-stencil))))
 
@@ -522,6 +522,7 @@ indications per string.
          (dot-list (cdr (assoc 'dot-list parameters)))
          (xo-list (cdr (assoc 'xo-list parameters)))
          (fret-range (cdr (assoc 'fret-range parameters)))
+         (fret-count (1+ (- (cadr fret-range) (car fret-range))))
          (barre-list (cdr (assoc 'barre-list parameters)))
          (barre-type
           (assoc-get 'barre-type details 'curved))
@@ -541,7 +542,7 @@ indications per string.
         (set! fret-diagram-stencil
              (ly:stencil-add
               fret-diagram-stencil
-              (draw-dots layout props string-count fret-count fret-range
+              (draw-dots layout props string-count fret-count 
                          size finger-code dot-position dot-radius
                          th dot-list orientation))))
     (if (= (car fret-range) 1)