lilypond-user
[Top][All Lists]

Re: Draw a line on the X reference point of a grob

 From: Thomas Morley Subject: Re: Draw a line on the X reference point of a grob Date: Sun, 19 Jan 2020 22:34:10 +0100

```Am So., 19. Jan. 2020 um 22:21 Uhr schrieb Paolo Prete <address@hidden>:
>
>
> On Sun, Jan 19, 2020 at 9:52 PM Aaron Hill <address@hidden> wrote:
>>
>>
>> %%%%
>> \version "2.18.2"
>> {
>>    \once \override DynamicText.after-line-breaking = #(lambda (grob)
>>      (let* ((x-parent (ly:grob-parent grob X))
>>             (orig-sten (ly:grob-property x-parent 'stencil)))
>>        (ly:grob-set-property! x-parent 'stencil
>>          (grob-interpret-markup x-parent #{
>>             \markup \combine \stencil #orig-sten
>>               \with-dimensions #'(0 . 0) #'(0 . 0) \vcenter
>>               \with-color #red \draw-line #'(0 . 6) #}))))
>>    c'\mf
>> }
>> %%%%
>>
>
> How can I make it compile on 2.19 ?
> It compiles on 2.18 but it gives me this error on 2.19:
>
> var/task/ly/usr/share/lilypond/current/ly/init.ly:56:2: error: wrong type for
> argument 1.  Expecting stencil, found (quote ())
>
In 2.18.2 NoteHead is X-parent of DynamicText
In 2.19.83 NoteCoumn is X-parent of DynamicText

NoteHead has a stencil, NoteColumn not.

If you refer to the stencil of X-parent (as you do), 2.19.83 must fail.

Cheers,
Harm

```