+ Interval sp_iv = bar_width (sp);
+ Real space = sp_iv.length ();
+
+ Real rx = sp->get_bound (LEFT)->relative_coordinate (0, X_AXIS);
+ /*
+ we gotta stay clear of sp_iv, so move a bit to the right if
+ needed.
+ */
+ Real x_off = max (sp_iv[LEFT] - rx, 0.0);
+
+ Stencil mol;
+ mol.add_stencil (symbol_stencil (me, space));
+
+ mol.translate_axis (x_off, X_AXIS);
+ return mol.smobbed_copy ();
+}
+
+int
+calc_closest_duration_log (Grob *me, double duration, bool force_round_up, bool paranoid)
+{
+ bool round_up = force_round_up
+ || to_boolean (me->get_property ("round-up-to-longer-rest"));
+ int closest_usable_duration_log;
+
+ // Out of range initial values.
+ if (round_up)
+ closest_usable_duration_log = -15; // high value
+ else
+ closest_usable_duration_log = 15; // low value
+ int minimum_usable_duration_log = -15;
+ int maximum_usable_duration_log = 15;
+
+ SCM duration_logs_list = me->get_property ("usable-duration-logs");
+ if (paranoid
+ && (to_boolean (scm_null_p (duration_logs_list))
+ || !to_boolean (scm_list_p (duration_logs_list))))