lilypond-devel
[Top][All Lists]
Advanced

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

How the vertical layout engine correctly manages spanners' heights


From: Mike Solomon
Subject: How the vertical layout engine correctly manages spanners' heights
Date: Thu, 22 Jul 2010 15:24:39 +0100
User-agent: Microsoft-Entourage/11.4.0.080122

Hey all,
    I'm almost finished w/ a vector-graphic-spanner project I've been
working on in Lilypond (that I'm planning on using during the International
Composers Pyramid in Kent tomorrow...crosses fingers...), and to make it
work 100%, I have to make it so that the Y-extent of the spanner is
correctly taken into account every time the spanner breaks lines.  The
problem is that sometimes this extent is factored into the layout, and
sometimes it is disregarded.  You can see this on:

http://www.apollinemike.com/lilypond/vector1.pdf
http://www.apollinemike.com/lilypond/vector5.pdf

As the amount of code I've produced to make this happen is too big to
meaningfully summarize in an email, I'd rather solicit your help by asking:
how are spanners' (or just grobs' in general) y-extents found and taken into
account in the layout process?  Is there one place where lilypond's
vertically-oriented engraver(s) consult(s) grobs/spanners to find their
heights, and if so, where?  For example, how does lilypond know to take a
hairpin's height into account for every staff over which said hairpin is
split?  I see some candidates in the source code, but not knowing how any of
them really work, I'm not sure if any of the following are promising leads:

1) pure-height: if I created a callback with the correct extent, would that
do anything?
2) axis-group-interface: I am currently not using this interface.  Should I
be?  Does that help the correct heights to be factored into the layout?
3) are there multiple grob parameters that, when set in conjunction, sorta
cancel each other out and make lilypond disregard the Y-extent?
4) the unknown...

Currently, a slew of pacifier prints using `format' confirm that I'm using
the correct extents for the stencil and that the 'Y-extent property is
always correct when the print statement is called.  Furthermore, when I
print the grob properties (via ly:grob-properties) to the command line, the
correctly and incorrectly laid-out grobs all have the same properties.  So,
it's hard for me to track down the source of this inconsistent behavior.
Any thoughts would be appreciated!

~Mike

P.S. If any of you are particularly brave, I will send you a patch with my
source...but it's long...





reply via email to

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