Piaras Hoban <phoban01 <at> gmail.com> writes:
>
> David Nalesnik-2 wrote
> > I think it has to do with when 'after-line-breaking is called. Vertical
> > spacing obviously hasn't been solidified. If I modify your
> > override/function to work on 'color, which is processed very late, I get
> > the stencil without disruption and can get information from it.
>
> Hmm, but at this stage whilst it is possible to access the 'stencil
property
> it doesn't seem possible to modify it.
>
> However, it seems like incorrect behaviour that spacing should be affected
> by accessing any of these properties in the first place.
In a different system, accessing the stencil before it is drawn would
give an error, but LilyPond seems to be written to /try/ to resolve the
dependencies (in this case, determine the staff-spacing early) and give
and error ("cyclic dependency") only for those cases where programmers
have written a trap to avoid known problems.
If you want to take LilyPond's stencil and modify it, you do not need
to do that immediately after line-breaking.
Maybe you can override the 'stencil command itself with a wrapper function.
LilyPond will call the wrapper when she is ready to draw the Glissando,
you can first call the default function (ly:line-spanner::print) to
generate the stencil, modify what it returns, and return the modified
stencil from your wrapper function to be printed.
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user