if (d == RIGHT && it->break_status_dir () != col_dir)
{
- it = it -> find_prebroken_piece (col_dir);
-
+ it = it->find_prebroken_piece (col_dir);
}
/*
some kind of mismatch, eg. a note column, that is behind a
FIXED also includes the left part of the right object.
*/
*fixed
- = (left_head_wid.is_empty () ? increment :
- /*
- Size of the head:
- */
+ = (left_head_wid.is_empty () ? increment
+ : /*
+ Size of the head:
+ */
(left_head_wid[RIGHT]+
/*
Real chord_start = hp[sd];
Real stem_end = Stem::stem_end_position (stem);
- stem_posns[d] = Interval (chord_start <? stem_end, chord_start>? stem_end);
+ stem_posns[d] = Interval (min (chord_start, stem_end), max (chord_start, stem_end));
head_posns[d].unite (hp);
}
}
stem_posns[RIGHT] = bar_yextent;
}
- if (correct_stem_dirs && stem_dirs[LEFT] *stem_dirs[RIGHT] == -1)
+ if (correct_stem_dirs && stem_dirs[LEFT] * stem_dirs[RIGHT] == -1)
{
if (beams_drul[LEFT] && beams_drul[LEFT] == beams_drul[RIGHT])
{
}
}
- correction = note_head_width* stem_dirs[LEFT];
+ correction = note_head_width * stem_dirs[LEFT];
correction *= robust_scm2double (me->get_property ("knee-spacing-correction"), 0);
*fixed += correction;
}
/*
Ugh. 7 is hardcoded.
*/
- correction = (correction / 7) <? 1.0;
+ correction = min (correction / 7, 1.0);
correction *= stem_dirs[LEFT];
correction
*= robust_scm2double (me->get_property ("stem-spacing-correction"), 0);
}
}
}
- else if (correct_stem_dirs && stem_dirs[LEFT] *stem_dirs[RIGHT] == UP)
+ else if (correct_stem_dirs && stem_dirs[LEFT] * stem_dirs[RIGHT] == UP)
{
/*
Correct for the following situation:
= (head_posns[LEFT][DOWN] > head_posns[RIGHT][UP]) ? RIGHT : LEFT;
Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP];
- Real corr = robust_scm2double (me->get_property ("stem-spacing-correction"), 0);
- corr = (delta <= 1) ? 0.0 : 0.25;
-
- correction = -lowest * corr;
+ Real corr = robust_scm2double (me->get_property ("same-direction-correction"), 0);
+
+ if (delta > 1)
+ correction = -lowest * corr;
}
*space += correction;
/* there used to be a correction for bar_xextent () here, but
it's unclear what that was good for ?
*/
-
}
-
ADD_INTERFACE (Note_spacing, "note-spacing-interface",
"This object calculates spacing wishes for individual voices.",
- "left-items right-items stem-spacing-correction knee-spacing-correction");
+ "left-items right-items stem-spacing-correction same-direction-correction knee-spacing-correction");