source file of the GNU LilyPond music typesetter
- (c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "font-interface.hh"
Stencil open = Font_interface::get_default_font (me)->find_by_name ("accidentals.leftparen");
Stencil close = Font_interface::get_default_font (me)->find_by_name ("accidentals.rightparen");
- m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0,0);
- m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0,0);
+ m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0, 0);
+ m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0, 0);
return m;
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface, after_line_breaking, 1);
SCM
Accidental_interface::after_line_breaking (SCM smob)
{
&& !parens
&& scm_ilength (accs) == 1)
{
- if (scm_to_int (scm_car (accs)) == FLAT)
+ switch (scm_to_int (scm_car (accs))
+ {
+ case FLAT:
{
Box stem = b;
Box bulb = b;
boxes.push (bulb);
boxes.push (stem);
}
-
+ break;
+ case NATURAL:
+ {
+ Box lstem = b;
+ Box rstem = b;
+ Box belly = b;
+
+ lstem[Y_AXIS] *= 1.1;
+ rstem[Y_AXIS] *= 1.1;
+
+ belly[Y_AXIS] *= 0.75;
+ lstem[X_AXIS][RIGHT] *= .5;
+ rstem[X_AXIS][LEFT] = lstem[X_AXIS][RIGHT];
+ lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
+ rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
+ boxes.push (belly);
+ boxes.push (lstem);
+ boxes.push (rstem);
+ }
+ break;
/*
- TODO: add support for natural, double flat.
+ TODO: add support for, double flat.
*/
}
return style + to_string (alteration);
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,print,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);
SCM
Accidental_interface::print (SCM smob)
{
}
else
{
- mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1,0);
+ mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1, 0);
}
}