lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Attach point-and-click link to custom stencil


From: David Kastrup
Subject: Re: Attach point-and-click link to custom stencil
Date: Mon, 13 Mar 2017 13:46:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Urs Liska <address@hidden> writes:

> Am 13.03.2017 um 13:16 schrieb David Kastrup:
>> Urs Liska <address@hidden> writes:
>>
>>> Am 13.03.2017 um 13:07 schrieb David Kastrup:
>>>> Urs Liska <address@hidden> writes:

>>> I'm calling the function with \override Tie.stencil = #arced-curve-stencil
>>>
>>> which is defined as
>>>
>>> #(define (arced-curve-stencil grob)
>>>    ...
>>>
>>> and returns the result of a (ly:stencil-translate (ly:make-stencil call.
>> The point-and-click area is rectangular and taken from the stencil's
>> position and dimensions, so there is suspicion that they aren't what you
>> want them to be.
>
> OK. That means it could either be where the original grob would have
> been printed or maybe originating before the stencil-translate is
> applied. I'll investigate.

No, stencil-translate obviously should shift the area.  The question is
what dimensions you pass to the make-stencil call.

>>>> With stencils, you should not need to do anything.  When calling
>>>> ly:engraver-make-grob yourself, be sure to specify a good cause.
>>>> Then the originating event's point-and-click info will be
>>>> automatically attached.

>>> As usual the information about ly:engraver-make-grob on the
>>> Scheme-functions page doesn't help me very much. All I would be able
>>> to figure out is the cause, but what kind of "engraver instance"
>>> should I be referring to here?

>> The one passed to the engraver callback?
>
> You mean what I refer to as "grob" in my example?

No.  You don't call ly:engraver-make-grob from within a grob's stencil
callback.  You call it from within the callbacks of an engraver
instance, those which are defined with make-engraver .

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]