Joe Neeman schreef:
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.
Can't we just get away with assuming that functions that don't have
y-extent-safe have point dimensions? BTW, naming would be
like
safe-foo-bar
"safe" might even be renamed "pure" or "readonly" which better reflects
the idea of the functionality.
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?
Actually, no.
What I had in mind was only to detect when hara kiri staves are alive or
not, and use that to make an estimate of system height (with a fixed
system height setting). Your approach here will get more accurate
results, but I'm a little worried that the XXX_safe functions and
properties will spread throughout the code, which is a problem as
they're duplicating functionality.
Does this patch already work for determining system heights, or is just
the beginning of the work? How much more must done?
BTW, the idea of precomputing when parts of a VerticalAlignment are
hara-kiri'd can still be used to speed up the end result, I think.
--
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel