if (scm_is_string (s) && scm_is_number (barsize))
{
- String str = ly_scm2string (s);
+ string str = ly_scm2string (s);
Real sz = robust_scm2double (barsize, 0);
if (sz <= 0)
return SCM_EOL;
}
Stencil
-Bar_line::compound_barline (Grob *me, String str, Real h,
+Bar_line::compound_barline (Grob *me, string str, Real h,
bool rounded)
{
Real kern = robust_scm2double (me->get_property ("kern"), 1);
Real hair = robust_scm2double (me->get_property ("hair-thickness"), 1);
Real fatline = robust_scm2double (me->get_property ("thick-thickness"), 1);
- Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
Real staff_space = Staff_symbol_referencer::staff_space (me);
kern *= staffline;
{
Real blot
= rounded
- ? me->layout ()->get_dimension (ly_symbol2scm ("blotdiameter"))
+ ? me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"))
: 0.0;
return Lookup::round_filled_box (Box (Interval (0, w),
Bar_line::calc_bar_size (SCM smob)
{
Grob *me = unsmob_grob (smob);
- Real ss = Staff_symbol_referencer::staff_space (me);
-
- if (Staff_symbol_referencer::get_staff_symbol (me))
+ if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (me))
{
- /*
- If there is no staff-symbol, we get -1 from the next
- calculation. That's a nonsense value, which would collapse the
- barline so we return 0.0 in the next alternative.
- */
- Real ysize = (Staff_symbol_referencer::line_count (me) -1);
- ysize = ysize * ss + Staff_symbol_referencer::line_thickness (me);
- return scm_from_double (ysize);
+ Interval staff_y = staff->extent (staff, Y_AXIS);
+ return scm_from_double (staff_y.is_empty () ? 0.0 : staff_y.length ());
}
return scm_from_int (0);
}