2016-09-21 23:47 GMT+02:00 David Nalesnik <david.nales...@gmail.com>:
>> The other thing I didn't find is: how can I create a dashed (or
>> otherwise styled) line stencil with make-line-stencil?
I was going to write:
If you regard the basics you'll see something like the following example:
0.2 ; width
0.5 ;; on
0.5 ; off
10 ;; x-end
10 ;; y-end
0 ;; phase
(cons 0 10)
(cons 0 10))
0.2 ; width
0 ; startx
0 ; starty
10 ; endx
'(0 . 10)
'(0 . 10))
So there's no direct method to switch between both, because of the
kind and amount of arguments differ.
But you can use some "meta"-functions like:
(and now follow David' reply)
> You should use ly:line-interface::line (which is available from
> 2.19.27, off the top of my head).
> Here's an example with both text and different line styles.
> (Even though TextScript doesn't support line-interface, you can still
> tweak line-related properties!)
> \version "2.19.46"
> #(define (my-stencil grob)
> (let* ((line (ly:line-interface::line grob 1.5 0 6 0))
> (text (grob-interpret-markup grob "A"))
> (stil (apply ly:stencil-add (list line text))))
> \override TextScript.stencil = #my-stencil
> c''1 -\tweak style #'dashed-line ^""
> c''1 -\tweak style #'zigzag ^""
>> More generally: how can I learn more about these things? Searching
>> lilypond.org seems to only point to snippets and no real explanations.
> There's not much to go on.
> grob-interpret-markup is mentioned here:
> The function doesn't have a docstring:
> #(display (procedure-documentation grob-interpret-markup))
> returns #f ...
> ly:line-interface::line is listed in the IR (Scheme functions)
> Sorry I can't be more helpful.
lilypond-user mailing list