Urs Liska <[email protected]> writes:

> Hi,
>
> I have a hard time understanding ly:grob-original and whether I need it.
> I'm working on a custom slur stencil and now have to support broken slurs.
>
> I looked into the implementation of \shape (which is only partially
> appropriate because it doesn't create a stencil but property overrides)
> and found that it splits the grob into its siblings using this code:
>
> (let* ((orig (ly:grob-original grob))
>             (siblings (if (ly:spanner? grob)
Looks like (if (ly:spanner? orig) ... would make more sense here.
>                           (ly:spanner-broken-into orig) '()))

> I don't really see why "orig" is created here. What's the difference
> between the last line of the example and using (ly:spanner-broken into
> grob) here? As usual the documentation on the Scheme-functions page
> isn't helpful ...

Apparently grob is assumed to possibly already be a broken piece of slur
here.  So its unbroken original is looked up, and the pieces are taken
from there.

All these are pure read-only functions: nothing is "split" or "broken"
in these lines themselves.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to