dottedExtender mit minimal 3 Punkten
This commit is contained in:
1 parent
0d9db52750
commit
e5b3e721ce
1 file changed
+21
-11
@@ -290,21 +290,31 @@ updown =
|
||||
#}))
|
||||
|
||||
dottedExtender = {
|
||||
\override LyricExtender.style = #'dotted-line
|
||||
\override LyricExtender.thickness = 2
|
||||
\override LyricExtender.Y-offset = 0.1
|
||||
% Punkte selbst zeichnen, damit immer mindestens 3 zu sehen sind
|
||||
\override LyricExtender.stencil =
|
||||
#(lambda (grob)
|
||||
(let* ((stil (ly:lyric-extender::print grob))
|
||||
(nostil (null? stil))
|
||||
(x-ext (if nostil 0 (ly:stencil-extent stil X))))
|
||||
(if nostil
|
||||
stil
|
||||
(make-connected-line
|
||||
(list
|
||||
(cons (car x-ext) 0)
|
||||
(cons (cdr x-ext) 0))
|
||||
grob))))
|
||||
(let ((stil (ly:lyric-extender::print grob)))
|
||||
(if (null? stil)
|
||||
stil
|
||||
(let* ((x-ext (ly:stencil-extent stil X))
|
||||
(thick (* (ly:staff-symbol-line-thickness grob)
|
||||
(ly:grob-property grob 'thickness 1)))
|
||||
(period (* (ly:staff-symbol-staff-space grob)
|
||||
(ly:grob-property grob 'dash-period 1.0)))
|
||||
(min-gap (* 1.5 thick))
|
||||
(start (car x-ext))
|
||||
(len (max (interval-length x-ext) (* 2 min-gap)))
|
||||
(count (max 3 (1+ (inexact->exact (round (/ len period))))))
|
||||
(gap (/ len (1- count))))
|
||||
(apply ly:stencil-add
|
||||
(map (lambda (i)
|
||||
(ly:stencil-translate-axis
|
||||
(make-circle-stencil (/ thick 2) 0 #t)
|
||||
(+ start (* i gap))
|
||||
X))
|
||||
(iota count)))))))
|
||||
}
|
||||
|
||||
melisOff = \set ignoreMelismata = ##t
|
||||
|
||||
Reference in new issue
Block a user