Re: Turns off TupletBracket collision avoidance if Script avoids slur (issue 5821051)
On Mar 16, 2012, at 12:27 AM, m...@apollinemike.com wrote: > On Mar 15, 2012, at 12:03 PM, d...@gnu.org wrote: > >> On 2012/03/14 20:35:34, MikeSol wrote: >>> Meh...not my best work, but it is a first step towards fixing this >> problem. >> >> To me it looks more like an attempt to hide the problem's symptoms. It >> does not appear to have any relation with line-breaking which is the >> context in which the problem manifested itself. >> > > The problem is a circular dependency: > > --) Tuplet bracket position calculation trys to avoid script > --) Tuplet bracket gets script's coordinates > --) Script has slur offset callback chained to it > --) Slur offset callback needs to know slur positions > --) Slur positions determined by encompass objects > --) Slur encompasses tuplet number > --) Tuplet number depends on tuplet bracket's position > > I don't know where/how line breaking factors into it, but the above > description is definitely what's going on. What I've proposed is a short, > minimally invasive workaround until a more thorough solution can be thought > out. Sorry - I haven't had time to check the regtests yet, but I will either over the weekend or next week - apparently some mangling is going on. It'd delay 2.16, but this problem can be fully fleshed out over a few weeks. Or we could just revert the patch and then re-apply a better version after 2.16 is out. I'll have a better sense of the size of the job after I look into it a bit more. Cheers, MS ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Turns off TupletBracket collision avoidance if Script avoids slur (issue 5821051)
On Mar 15, 2012, at 12:03 PM, d...@gnu.org wrote: > On 2012/03/14 20:35:34, MikeSol wrote: >> Meh...not my best work, but it is a first step towards fixing this > problem. > > To me it looks more like an attempt to hide the problem's symptoms. It > does not appear to have any relation with line-breaking which is the > context in which the problem manifested itself. > The problem is a circular dependency: --) Tuplet bracket position calculation trys to avoid script --) Tuplet bracket gets script's coordinates --) Script has slur offset callback chained to it --) Slur offset callback needs to know slur positions --) Slur positions determined by encompass objects --) Slur encompasses tuplet number --) Tuplet number depends on tuplet bracket's position I don't know where/how line breaking factors into it, but the above description is definitely what's going on. What I've proposed is a short, minimally invasive workaround until a more thorough solution can be thought out. Cheers, MS ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Turns off TupletBracket collision avoidance if Script avoids slur (issue 5821051)
On 2012/03/14 20:35:34, MikeSol wrote: Meh...not my best work, but it is a first step towards fixing this problem. To me it looks more like an attempt to hide the problem's symptoms. It does not appear to have any relation with line-breaking which is the context in which the problem manifested itself. http://codereview.appspot.com/5821051/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Turns off TupletBracket collision avoidance if Script avoids slur (issue 5821051)
Reviewers: , Message: Meh...not my best work, but it is a first step towards fixing this problem. A full solution would do tuplet avoidance for scripts in the same way they're done for slurs. Takers? Description: Turns off TupletBracket collision avoidance if Script avoids slur Please review this at http://codereview.appspot.com/5821051/ Affected files: M lily/tuplet-bracket.cc Index: lily/tuplet-bracket.cc diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 40e0c728c5ef2c353de391bd5da025386bce7007..8e4a3c017ce4ee6f0a3b2089810396063f8aa55b 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -669,6 +669,13 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy) if (scm_is_number (scripts[i]->get_property ("outside-staff-priority"))) continue; + // assume that if a script is avoiding slurs, it should not get placed + // under a tuplet bracket + SCM avoid = scripts[i]->get_property ("avoid-slur"); + if (avoid == ly_symbol2scm ("outside") + || avoid == ly_symbol2scm ("around")) +continue; + Interval script_x (scripts[i]->extent (commonx, X_AXIS)); Interval script_y (scripts[i]->extent (commony, Y_AXIS)); ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel