- Box b;
- b[X_AXIS] = me->extent (me, X_AXIS);
- b[Y_AXIS] = me->extent (me, Y_AXIS);
-
- vector<Box> boxes;
-
- bool parens = to_boolean (me->get_property ("parenthesized"));
- if (!me->is_live ())
- return boxes;
-
- if (!to_boolean (me->get_property ("restore-first"))
- && !parens)
- {
- SCM alist = me->get_property ("glyph-name-alist");
- SCM alt = me->get_property ("alteration");
- string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F),
- "");
-
- if (glyph_name == "accidentals.flat"
- || glyph_name == "accidentals.mirroredflat")
- {
- Box stem = b;
- Box bulb = b;
-
- /*
- we could make the stem thinner, but that places the flats
- really close.
- */
- Direction bulb_dir =
- glyph_name == "accidentals.mirroredflat" ? LEFT : RIGHT;
- stem[X_AXIS][bulb_dir] = stem[X_AXIS].center ();
-
- /*
- To prevent vertical alignment for 6ths
- */
- stem[Y_AXIS] *= 1.1;
- bulb[Y_AXIS][UP] *= .35;
-
- boxes.push_back (bulb);
- boxes.push_back (stem);
- }
- else if (glyph_name == "accidentals.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] *= .33;
- rstem[X_AXIS][LEFT] = rstem[X_AXIS].linear_combination (1.0 / 3.0);
- lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
- rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
- boxes.push_back (belly);
- boxes.push_back (lstem);
- boxes.push_back (rstem);
- }
- /*
- TODO: add support for, double flat.
- */
- }