|
From: | Pavel Roskin |
Subject: | Re: Cross-staff stem engraver (was: New frog in an empty pond?) |
Date: | Sat, 25 Feb 2012 08:49:12 -0500 |
User-agent: | Internet Messaging Program (IMP) H3 (4.1.4) |
Quoting Joe Neeman <address@hidden>:
On Fri, Feb 24, 2012 at 3:04 PM, Pavel Roskin <address@hidden> wrote:I tried writing an engraver that could be added to the StaffGroup context. Collecting stems is not a problem. The problem is that even the finalize handler is called to early. I'm getting a warning: programming error: vertical alignment called before line breaking continuing, cross fingersIt's a little hard to guess what's going wrong without knowing exactly what you've tried. Are you trying to do layout logic in the engraver (ie. by collecting stems, reading their properties, doing calculations and then setting more properties)?
Yes, except that I'm not setting anything yet. The current file is attached.
If you are, the first step is to move the layout logic into grob callbacks.
I guess I'll need to redefine the stencil for stems. Or maybe you mean some other callback?
I did a similar thing before. I put all the logic into a function that was used to redefine the length property of the stem. It worked for a simple case of two stems, but failed when three stems needed to be connected. The Y-extent for at least one of the stems wasn't calculated yet.
I also tried setting Y-extent, but it's read-only. -- Regards, Pavel Roskin
stemengraver.ly
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |