source file of the GNU LilyPond music typesetter
- (c) 2001--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
}
}
- if (extents[d].empty_b ())
+ if (extents[d].is_empty ())
extents[d] = Interval (0,0);
}
while (flip (&d) != LEFT);
FIXED also includes the left part of the right object.
*/
*fixed =
- (left_head_wid.empty_b () ? increment :
+ (left_head_wid.is_empty () ? increment :
/*
Size of the head:
*/
/*
What is sticking out of the right note:
*/
- + (extents[RIGHT].empty_b() ? 0.0 : - extents[RIGHT][LEFT] / 2);
+ + (extents[RIGHT].is_empty () ? 0.0 : - extents[RIGHT][LEFT] / 2);
/*
We don't do complicated stuff: (base_space - increment) is the
it = it->find_prebroken_piece (rcolumn->break_status_dir ());
}
- Grob *last = Staff_spacing::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
+ Grob *last = Separation_item::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
if (last)
bar_yextent = Staff_spacing::bar_y_positions (last);
Real correction = 0.0;
- if (!bar_yextent.empty_b())
+ if (!bar_yextent.is_empty ())
{
stem_dirs[RIGHT] = - stem_dirs[LEFT];
stem_posns[RIGHT] = bar_yextent;
{
head_extent = head->extent (rcolumn, X_AXIS);
- if (!head_extent.empty_b())
+ if (!head_extent.is_empty ())
note_head_width = head_extent[RIGHT];
if (st)
{
- Real thick = gh_scm2double (st->get_grob_property ("thickness"))
- * st->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+ Real thick = Stem::thickness (st);
note_head_width -= thick;
}
}
correction = note_head_width* stem_dirs[LEFT];
- correction *= gh_scm2double (me->get_grob_property ("knee-spacing-correction"));
+ correction *= robust_scm2double (me->get_grob_property ("knee-spacing-correction"), 0);
*fixed += correction;
}
else
{
intersect = stem_posns[LEFT];
intersect.intersect(stem_posns[RIGHT]);
- correct_stem_dirs = correct_stem_dirs && !intersect.empty_b ();
+ correct_stem_dirs = correct_stem_dirs && !intersect.is_empty ();
if (correct_stem_dirs)
{
correction = (correction/7) <? 1.0;
correction *= stem_dirs[LEFT] ;
correction *=
- gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+ robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0);
}
- if (!bar_yextent.empty_b())
+ if (!bar_yextent.is_empty ())
{
correction *= 0.5;
}
Interval hp = head_posns[LEFT];
hp.intersect (head_posns[RIGHT]);
- if (!hp.empty_b())
+ if (!hp.is_empty ())
return ;
Direction lowest =
(head_posns[LEFT][DOWN] > head_posns[RIGHT][UP]) ? RIGHT : LEFT;
Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP] ;
- Real corr = gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+ Real corr = robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0);
corr = (delta <= 1) ? 0.0 : 0.25;
correction= -lowest * corr ;
*space += correction;
-#if 0
/* there used to be a correction for bar_xextent() here, but
it's unclear what that was good for ?
*/
-#endif
}