Grob *st = get_staff_symbol (me);
if (st)
return Staff_symbol::get_line_thickness (st);
- return me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+ return me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
}
Real
return robust_scm2double (me->get_property ("staff-position"), p);
}
+int
+Staff_symbol_referencer::get_rounded_position (Grob*me)
+{
+ return int (rint (get_position (me)));
+}
LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
1, 0,0, (SCM sg),
Real pos = Staff_symbol_referencer::get_position (g);
if (fabs (rint (pos) -pos) < 1e-6) // ugh.
- return gh_int2scm ((int) my_round (pos));
+ return scm_int2num ((int) my_round (pos));
else
- return gh_double2scm (pos);
+ return scm_make_real (pos);
}
SCM pos = me->get_property ("staff-position");
Real off = 0.0;
- if (gh_number_p (pos))
+ if (is_number (pos))
{
Real space = Staff_symbol_referencer::staff_space (me);
- off = gh_scm2double (pos) * space / 2.0;
- me->set_property ("staff-position", gh_int2scm (0));
+ off = ly_scm2double (pos) * space / 2.0;
+ me->set_property ("staff-position", scm_int2num (0));
}
- return gh_double2scm (off);
+ return scm_make_real (off);
}
/* This sets the position relative to the center of the staff symbol.
if (st && me->common_refpoint (st, Y_AXIS))
{
Real oldpos = get_position (me);
- me->set_property ("staff-position", gh_double2scm (p - oldpos));
+ me->set_property ("staff-position", scm_make_real (p - oldpos));
}
else
- me->set_property ("staff-position", gh_double2scm (p));
+ me->set_property ("staff-position", scm_make_real (p));
if (!me->has_offset_callback (Staff_symbol_referencer::callback_proc,
Y_AXIS))
"in their @code{Y-offset-callbacks}. "
,
"staff-position");
+