+ /* TODO: maybe property stroke-style should take different values,
+ e.g. "" (i.e. no stroke), "single" and "double" (currently, it's
+ '() or "grace"). */
+ String flag_style;
+
+ SCM flag_style_scm = me->get_property ("flag-style");
+ if (scm_is_symbol (flag_style_scm))
+ flag_style = ly_symbol2string (flag_style_scm);
+
+ if (flag_style == "no-flag")
+ return Stencil ();
+
+ bool adjust = true;
+
+ String staffline_offs;
+ if (String::compare (flag_style, "mensural") == 0)
+ /* Mensural notation: For notes on staff lines, use different
+ flags than for notes between staff lines. The idea is that
+ flags are always vertically aligned with the staff lines,
+ regardless if the note head is on a staff line or between two
+ staff lines. In other words, the inner end of a flag always
+ touches a staff line.
+ */
+ {
+ if (adjust)
+ {
+ int p = (int)(rint (stem_end_position (me)));
+ staffline_offs =
+ Staff_symbol_referencer::on_staffline (me, p) ? "0" : "1";
+ }
+ else
+ {
+ staffline_offs = "2";
+ }
+ }
+ else