(if (eq? finger-code 'in-dot) 0.425 0.25)) ; bigger dots if labeled
(default-dot-position
(if (eq? finger-code 'in-dot)
- (- 0.95 default-dot-radius)
- 0.6)) ; move up to make room for bigger dot if labeled
+ (- 0.95 default-dot-radius)
+ 0.6)) ; move up to make room for bigger dot if labeled
(dot-radius
(assoc-get
'dot-radius details default-dot-radius)) ; needed for draw-dots
- ; and draw-barre
+ ; and draw-barre
(dot-position
(assoc-get
- 'dot-position details default-dot-position)) ; needed for draw-dots
- ; and draw-barre
+ 'dot-position details default-dot-position)) ; needed for
+ ; draw-dots and draw-barre
(th
(* (ly:output-def-lookup layout 'line-thickness)
(chain-assoc-get 'thickness props 0.5))) ; needed for draw-frets
- ; and draw-strings
+ ; and draw-strings
(sth (* size th))
(thickness-factor (assoc-get 'string-thickness-factor details 0))
(alignment
in stencil coordinate system."
(cond
((eq? orientation 'landscape)
- (cons fret-coordinate string-coordinate))
+ (cons fret-coordinate
+ (- string-coordinate (1- string-count))))
((eq? orientation 'opposing-landscape)
(cons (- fret-coordinate) (- string-coordinate)))
(else
(cons string-coordinate (- fret-coordinate)))))
+ (define (stencil-coordinate-offset fret-offset string-offset)
+ "Return a pair @code{(x-offset . y-offset)}
+ for translation in stencil coordinate system."
+ (cond
+ ((eq? orientation 'landscape)
+ (cons fret-offset (- string-offset)))
+ ((eq? orientation 'opposing-landscape)
+ (cons (- fret-offset) string-offset))
+ (else
+ (cons string-offset (- fret-offset)))))
+
+
+
(define (make-bezier-sandwich-list start stop base height
half-thickness)
"Make the argument list for a bezier sandwich from
(if (null? restlist)
positioned-glyph
(ly:stencil-add
+ positioned-glyph
(draw-xo restlist)))))
(define (draw-capo fret)
(xo-stencil (draw-xo xo-list))
(xo-fret-offset
(stencil-fretboard-offset
- xo-stencil 'fret orientation)))
+ xo-stencil 'fret orientation))
+ (xo-stencil-offset
+ (stencil-coordinate-offset
+ (- diagram-fret-top
+ xo-fret-offset
+ (* size xo-padding))
+ 0)))
(set! fret-diagram-stencil
(ly:stencil-add
fret-diagram-stencil
(ly:stencil-translate
xo-stencil
- (stencil-coordinates
- (- diagram-fret-top
- xo-fret-offset
- (* size xo-padding))
- 0)))))) ; no string offset
-
+ xo-stencil-offset)))))
(if (> capo-fret 0)
(set! fret-diagram-stencil
(ly:stencil-add