source file of the GNU LilyPond music typesetter
- (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1996--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
#if DEBUG_SLUR_SCORING
SCM quant_score = me->get_property ("quant-score");
- if (to_boolean (me->get_layout ()
+ if (to_boolean (me->layout ()
->lookup_variable (ly_symbol2scm ("debug-slur-scoring")))
&& scm_is_string (quant_score))
{
SCM properties = Font_interface::text_font_alist_chain (me);
Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
- (me->get_layout ()->self_scm (), properties,
+ (me->layout ()->self_scm (), properties,
quant_score));
a.add_at_edge (Y_AXIS, get_grob_direction (me), tm, 1.0, 0);
}
Slur::outside_slur_callback (SCM grob, SCM offset_scm)
{
Grob *script = unsmob_grob (grob);
- Grob *slur = unsmob_grob (script->get_object ("slur"));
+ Grob *slur = unsmob_grob (script->get_object ("slur"));
if (!slur)
return offset_scm;
+ SCM avoid = script->get_property ("avoid-slur");
+ if (avoid != ly_symbol2scm ("outside")
+ && avoid != ly_symbol2scm ("around"))
+ return offset_scm;
+
Direction dir = get_grob_direction (script);
if (dir == CENTER)
return offset_scm;
bool consider[] = { false, false, false };
Real ys[] = {0, 0, 0};
bool do_shift = false;
- SCM avoid = script->get_property ("avoid-slur");
-
+
for (int d = LEFT, k = 0; d <= RIGHT; d++, k++)
{
Real x = xext.linear_combination ((Direction) d);
/* Request shift if slur is contained script's Y, or if
script is inside slur and avoid == outside. */
if (yext.contains (ys[k])
- || (avoid == ly_symbol2scm ("outside")
- && dir * ys[k] > dir * yext[-dir]))
+ || (dir * ys[k] > dir * yext[-dir] && avoid == ly_symbol2scm ("outside")))
do_shift = true;
}
}
"positions "
"quant-score "
"ratio "
- "slur-details "
+ "details "
"thickness ");