lilypond-devel
[Top][All Lists]
Advanced

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

Re: proposed enhancement to vertical stretching logic


From: Joe Neeman
Subject: Re: proposed enhancement to vertical stretching logic
Date: Mon, 7 Jul 2008 20:00:28 +0200

On Sat, Jul 5, 2008 at 11:04 PM, Reinhold Kainhofer <address@hidden> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've now re-implemented the stretch method with parameters that should exactly
reproduce the current stretching (i.e. equal amounts of space are inserted),
but now uses the springs-and-rods problem. My only problem is that I cannot
get the springs-and-rods problem to return spring positions different from
the initialization values... In other words, no stretching is done at all!

Since the Lilypond does not contain any comments or other documentation
whatsoever, I simply don't know how using the Simple_spacer class should
work... Can someone please take a look at the attached patch and tell me what
I'm doing wrong!

I've only had a look at the patch without actually testing anything, but I suspect the problem is the first argument of spacer.solve, which should be "length" rather than "amount". By the way, feel free to add whatever documentation you think is appropriate!


> > 2) To work properly also with rhythmic staves and tab staves, I think
> > that the
> > springs should go only from the end of one staff to the beginning of the
> > next, as otherwise the staff extends will already take away some of the
> > vertical space that should be equally distributed. How do I get the staff
> > extents?
>
> I guess you need to find the StaffSymbol somehow...

How can I do that? At this point of the code, I only have access to the
VerticalAxisGroup. How do I get the staff symbol it is associated with?

The only thing that springs to mind right now is to scan through its 'elements (using extract_grob_set), looking for something that implements an appropriate StaffSymbol-related interface.

Joe

reply via email to

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