#include "separation-item.hh"
#include "spacing-options.hh"
#include "spanner.hh"
+#include "staff-symbol.hh"
#include "staff-symbol-referencer.hh"
#include "system.hh"
#include "text-interface.hh"
return mol.smobbed_copy ();
}
+MAKE_SCHEME_CALLBACK (Multi_measure_rest, height, 1);
+SCM
+Multi_measure_rest::height (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ Real space = 1000000; // something very large...
+
+ Stencil mol;
+ mol.add_stencil (symbol_stencil (me, space));
+
+ return ly_interval2scm (mol.extent (Y_AXIS));
+}
+
int
calc_closest_duration_log (Grob *me, double duration, bool force_round_up, bool paranoid)
{
&& (to_boolean (scm_null_p (duration_logs_list))
|| !to_boolean (scm_list_p (duration_logs_list))))
{
- warning (_ ("usable-duration-logs must be a non-empty list. Falling back to whole rests."));
+ warning (_ ("usable-duration-logs must be a non-empty list."
+ " Falling back to whole rests."));
closest_usable_duration_log = 0;
}
else
{
if (mdl == 0 && me->get_property ("staff-position") == SCM_EOL)
{
- if (Staff_symbol_referencer::on_staff_line (me, 2))
- me->set_property ("staff-position", scm_from_int (2));
- else if (Staff_symbol_referencer::on_staff_line (me, 3))
- me->set_property ("staff-position", scm_from_int (3));
+ Real pos = Rest::staff_position_internal (me, mdl, 0);
+ me->set_property ("staff-position", scm_from_double (pos));
}
Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true));
if (!spacing)
spacing = unsmob_grob (ri->get_object ("spacing"));
if (!spacing)
- me->warning ("Using naive multi measure rest spacing.");
+ me->warning (_ ("Using naive multi measure rest spacing."));
else
{
Spacing_options options;