|
From: | David Nalesnik |
Subject: | Re: Reading a property |
Date: | Wed, 1 Apr 2015 12:34:40 -0500 |
Dear LilyPond fellows,
how can I read a property?
For example, after having applied
\override HorizontalBracket.line-thickness = #0.5
is there an easy way to access that value?
I know that it will work like this:
colorSpan =
#(define-music-function (parser location y-lower y-upper color)
(number? number? color?)
#{
\once\override HorizontalBracket.stencil =
$(lambda (grob)
(let* (
(thick (ly:grob-property grob 'line-thickness 1))
... do other stuff ...
(ly:make-stencil (list 'color color
(ly:stencil-expr (ly:round-filled-box X-ext Y-ext 0))
X-ext Y-ext))))
#})
But that only works "inside" this replacement function. Am I missing the
obvious?
I'm trying to expand what has been started with snippet 960:
http://lsr.di.unimi.it/LSR/Item?id=960
This is how far I've come:
ColorSpan-Showcase.ly
<http://lilypond.1069038.n5.nabble.com/file/n173954/ColorSpan-Showcase.ly>
ColorSpan-Showcase.pdf
<http://lilypond.1069038.n5.nabble.com/file/n173954/ColorSpan-Showcase.pdf>
ColorSpan-Example.ly
<http://lilypond.1069038.n5.nabble.com/file/n173954/ColorSpan-Example.ly>
ColorSpan-Example.pdf
<http://lilypond.1069038.n5.nabble.com/file/n173954/ColorSpan-Example.pdf>
[Prev in Thread] | Current Thread | [Next in Thread] |