/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1996--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
char dir = (d == UP) ? 'u' : 'd';
string font_char = flag_style
- + to_string (dir) + staffline_offs + to_string (log);
+ + ::to_string (dir) + staffline_offs + ::to_string (log);
return ly_string2scm ("flags." + font_char);
}
string stroke_style = ly_scm2string (stroke_style_scm);
if (!stroke_style.empty ())
{
- string font_char = flag_style + to_string (dir) + stroke_style;
+ string font_char = flag_style + ::to_string (dir) + stroke_style;
Stencil stroke = fm->find_by_name ("flags." + font_char);
if (stroke.is_empty ())
{
- font_char = to_string (dir) + stroke_style;
+ font_char = ::to_string (dir) + stroke_style;
stroke = fm->find_by_name ("flags." + font_char);
}
if (stroke.is_empty ())
Real blot
= me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
- Real y2 = pure
- ? stem->pure_height (stem, 0, INT_MAX)[d]
- : stem->extent (stem, Y_AXIS)[d];
+ Interval stem_extent = pure
+ ? stem->pure_height (stem, 0, INT_MAX)
+ : stem->extent (stem, Y_AXIS);
- return scm_from_double (y2 - d * blot / 2);
+ return scm_from_double (stem_extent.is_empty ()
+ ? 0.0
+ : stem_extent[d] - d * blot / 2);
}
MAKE_SCHEME_CALLBACK (Flag, calc_x_offset, 1);