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: Reinhold Kainhofer
Subject: Re: proposed enhancement to vertical stretching logic
Date: Sat, 5 Jul 2008 14:59:42 +0200
User-agent: KMail/1.9.9

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Mittwoch, 2. Juli 2008 schrieb Joe Neeman:
> On 7/1/08, Reinhold Kainhofer <address@hidden> wrote:
> > I've now had a quick look and think that the springs-and-rods problem
> > solver needs to be inserted in
> > Align_interface::align_elements_to_extents.
>
> Actually, I think that it would be better to unify the stretching with
> the system placement that is currently done in layout-page-layout.scm.
> That is, I think that we should space the whole page as one big
> rod-and-spring problem. This would require some significant surgery,
> but I think it is the right approach.

That's right, it would also solve some bugs like the attached example. Notice 
that the first two and the last system have exactly the same settings, namely 
max-stretch set to #10000000. Yet, they are stretched quite differently, 
which is a bad interference of max-stretch=#5 and the order in which the 
space is inserted in layout-page-layout...

The downside to this is that from Scheme we can't access the internals of the 
systems, while we have the list of systems in scheme, so we'll need to find 
the proper way to switch from Scheme to C++ somewhere...

> > 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...
> By the way, in simple-spacer.cc, two springs can only meet at a point
> (ie. you never get rods with no parallel springs). But its possible to
> get the same effect by tweaking the spring constant and ideal length
> of a spring.

yes, that's what I was thinking of anyway. Set the ideal length of the spring 
to the staff extents (plus maybe the padding) and use the stacked skylines as 
rods.

Cheers,
Reinhold

- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIb3BBTqjEwhXvPN0RAt1VAKCR25TTny7ZSbysKoJlyxgOnJQuxgCbBnC9
QZd2VbTHqQM7GPbolEbydvc=
=7TqD
-----END PGP SIGNATURE-----

Attachment: vertical-page-layout1.pdf
Description: Adobe PDF document

Attachment: vertical-page-layout1.ly
Description: Text Data


reply via email to

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