2007/4/1, Han-Wen Nienhuys <[EMAIL PROTECTED]>:
2007/4/1, Arvid Grøtting <[EMAIL PROTECTED]>:
> > Look at how rests are offset rest.cc, y_offset_callback. You have to
> > override/revert these settings.
>
> Or, actually, call that method again after setting direction to 0.
no, better not. Callbacks aren´t expected to work properly if you call
them twice. You have to look at the input value for the callback, and
change those.
Sure. I probably won't be motivated to fix that until it breaks, though.
> > > - this callback doesn't seem to be called by multi-measure rests. Any
> > > ideas on how to merge those?
> >
> > unset staff-position for mm rest.
>
> Yes, but is there a similar callback/hook where I can check for
> redundant multi-measure rests?
no, not that I know. MM rests just have a hard coded vertical position.
OK. So, in addition to automatical merging, they could benefit from
use of a skyline algorithm to detect collisions with other voices in a
staff?
> Code for merging ordinary rests is attached.
Your code could be improved much if it destillled all the info
necessary for a single rest in a list, and then did (equal? list1
list2)
Sure. But right now it works, and I have music to typeset.
--
Arvid
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel