/*
- gregorian-ligature-engraver.cc -- implement Gregorian_ligature_engraver
+ This file is part of LilyPond, the GNU music typesetter.
- source file of the GNU LilyPond music typesetter
+ Copyright (C) 2003--2011 Juergen Reuter <reuter@ipd.uka.de>
- (c) 2003--2006 Juergen Reuter <reuter@ipd.uka.de>
+ 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/>.
*/
#include "gregorian-ligature-engraver.hh"
void check_and_fix_all_prefixes (vector<Grob_info> primitives)
{
- /* Check for illegal head modifier combinations */
+ /* Check for invalid head modifier combinations */
for (vsize i = 0; i < primitives.size (); i++)
{
Grob *primitive = primitives[i].grob ();
int prefix_set = scm_to_int (primitive->get_property ("prefix-set"));
if (prefix_set & PES_OR_FLEXA)
- if (!i) // ligature may not start with 2nd head of pes or flexa
- primitive->warning (_ ("cannot apply `\\~' on first head of ligature"));
- else if (pitch > prev_pitch) // pes
- {
- prev_context_info |= PES_LOWER;
- context_info |= PES_UPPER;
- }
- else if (pitch < prev_pitch) // flexa
- {
- prev_context_info |= FLEXA_LEFT;
- context_info |= FLEXA_RIGHT;
- }
- else // (pitch == prev_pitch)
- primitive->warning (_ ("cannot apply `\\~' on heads with identical pitch"));
+ {
+ if (!i) // ligature may not start with 2nd head of pes or flexa
+ primitive->warning (_ ("cannot apply `\\~' on first head of ligature"));
+ else if (pitch > prev_pitch) // pes
+ {
+ prev_context_info |= PES_LOWER;
+ context_info |= PES_UPPER;
+ }
+ else if (pitch < prev_pitch) // flexa
+ {
+ prev_context_info |= FLEXA_LEFT;
+ context_info |= FLEXA_RIGHT;
+ }
+ else // (pitch == prev_pitch)
+ primitive->warning (_ ("cannot apply `\\~' on heads with identical pitch"));
+ }
if (prev_prefix_set & DEMINUTUM)
context_info |= AFTER_DEMINUTUM;