#include "staff-symbol-referencer.hh"
#include "beam.hh"
#include "stem.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
#include "group-interface.hh"
#include "align-interface.hh"
Real slt = Staff_symbol_referencer::line_thickness (me) / ss;
SCM sdy = me->get_property ("least-squares-dy");
- Real dy_mus = is_number (sdy) ? ly_scm2double (sdy) : 0.0;
+ Real dy_mus = ly_c_number_p (sdy) ? ly_scm2double (sdy) : 0.0;
Real straddle = 0.0;
Real sit = (thickness - slt) / 2;
#if DEBUG_QUANTING
SCM inspect_quants = me->get_property ("inspect-quants");
if (debug_beam_quanting_flag
- && is_pair (inspect_quants))
+ && ly_c_pair_p (inspect_quants))
{
Drul_array<Real> ins = ly_scm2interval (inspect_quants);
This test is too weak; we should really check all lines.
*/
Direction stem_dir = dirs[d];
- Real gap1 = y[d] - stem_dir * ((j-1) * beam_translation + thickness / 2 - slt/2 );
- Real gap2 = y[d] - stem_dir * (j * beam_translation - thickness / 2 + slt/2);
+
+ /*
+ The 2.2 factor is to provide a little leniency for
+ borderline cases. If we do 2.0, then the upper outer line
+ will be in the gap of the (2,sit) quant, leading to a
+ false demerit.
+ */
+ Real gap1 = y[d] - stem_dir * ((j-1) * beam_translation + thickness / 2 - slt/2.2 );
+ Real gap2 = y[d] - stem_dir * (j * beam_translation - thickness / 2 + slt/2.2);
Interval gap;
gap.add_point (gap1);