[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting the height of a system.
From: |
Joe Neeman |
Subject: |
Re: Getting the height of a system. |
Date: |
Mon, 22 May 2006 18:06:06 +1000 |
On Mon, 2006-05-15 at 12:20 +0200, Han-Wen Nienhuys wrote:
> Perhaps you could even compute for each VerticalAxisGroup the range of
> column ranks where it would disappear, and use that information add a
> method to compute the approximate height of an alignment spanner, where
> you explicitly call it with a (begin,end) pair of column ranks.
>
> In that case, you could get the approximate height of one broken system
> in logarithmic time.
>
Here's a first attempt at doing this. It isn't complete or well-tested
yet. I add 4 grob properties
Y-extent-safe
Y-offset-safe
default-Y-extent-is-safe
default-Y-offset-is-safe
where Y-extent-safe and Y-offset-safe are functions that take 3
arguments, a grob, and the starting and ending column ranks.
default-Y-blah-is-safe just marks grobs where we don't need a
Y-blah-safe because the default Y-blah doesn't introduce side effects.
This is pretty much just there for NoteHead.
I've implemented Y-extent-safe for axis-group-interface,
hara-kiri-group-interface and NoteHead. I think it might be useful to do
side-position-interface also since that will take care of markups,
rehearsal marks and some other things that tend to be positioned away
from the staff. But that looks a bit harder so I haven't done it yet.
Is this similar to what you had in mind?
height_estimate_20060522.patch
Description: Text Data