+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2004 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
/*
Determine whether a beam is concave.
+
+ A beam is concave when the middle notes get closer to the
+ beam than the left and right edge notes.
+
+ This is determined in two ways: by looking at the positions of the
+ middle notes, or by looking at the deviation of the inside notes
+ compared to the line connecting first and last.
+
+ The tricky thing is what to do with beams with chords. There are no
+ real guidelines in this case.
*/
#include "pointer-group-interface.hh"
Hmmm.. wait, for the beams in the last measure of morgenlied,
this doesn't look so good. Let's try the heads farthest from
the beam.
-
*/
Interval posns = Stem::head_positions (stems[i]);
Real concaveness = 0.0;
- if (is_concave_single_notes (far_positions, beam_dir))
+ if (is_concave_single_notes (beam_dir == UP ? close_positions : far_positions, beam_dir))
{
concaveness = 10000;
}