- switch (primitive)
- {
- case MLP_NONE:
- return Molecule();
- case MLP_BB:
- out = brew_flexa (me, delta_pitch, false,
- flexa_width, thickness, true, DOWN);
- break;
- case MLP_sc:
- out = Font_interface::get_default_font (me)->find_by_name ("noteheads--2mensural");
- break;
- case MLP_ss:
- out = Font_interface::get_default_font (me)->find_by_name ("noteheads--1mensural");
- break;
- case MLP_cs:
- out = Font_interface::get_default_font (me)->find_by_name ("noteheads-lmensural");
- break;
- case MLP_SS:
- out = brew_flexa (me, delta_pitch, false,
- flexa_width, thickness, true, UP);
- break;
- case MLP_LB:
- out = brew_flexa (me, delta_pitch, false,
- flexa_width, thickness, false, CENTER);
- break;
- default:
- programming_error (_f ("Mensural_ligature:"
- "unexpected case fall-through"));
- return Molecule ();
- }
-
- SCM join_left_scm = me->get_grob_property ("join-left-amount");
- if (join_left_scm != SCM_EOL)
- {
- int join_left = gh_scm2int (join_left_scm);
- if (!join_left)
- programming_error (_f ("Mensural_ligature: (join_left == 0)"));
- Real blotdiameter = (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
- Interval x_extent = Interval (0, thickness);
- Interval y_extent = (join_left > 0) ?
- Interval (-join_left * 0.5 * staff_space, 0) :
- Interval (0, -join_left * 0.5 * staff_space);
- Box stem_box (x_extent, y_extent);
-
- Molecule stem = Lookup::roundfilledbox (stem_box, blotdiameter);
- out.add_molecule (stem);
- }
-
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
- add_ledger_lines(me, &out, pos, 0, ledger_take_space);