- {
- Real y_top = join_right * 0.5 * staff_space;
- Real y_bottom = 0.0;
-
- if (y_top < 0.0)
- {
- y_bottom = y_top;
- y_top = 0.0;
-
- /*
- if the previous note is longa-shaped,
- the joining line may hide the stem, so made it longer
- to serve as stem as well
- */
- if (primitive & MLP_LONGA)
- /*
- instead of 3.0 the length of a longa stem should be used
- Font_interface::get_default_font (???)->find_by_name
- ("noteheads.s-2mensural").extent (Y_AXIS).length () * 0.5
- */
- y_bottom -= 3.0 * staff_space;
- }
-
- Interval x_extent (width - thickness, width);
- Interval y_extent (y_bottom, y_top);
- Box join_box (x_extent, y_extent);
- Stencil join = Lookup::round_filled_box (join_box, blotdiameter);
-
- out.add_stencil (join);
- }
+ {
+ Real y_top = join_right * 0.5 * staff_space;
+ Real y_bottom = 0.0;
+
+ if (y_top < 0.0)
+ {
+ y_bottom = y_top;
+ y_top = 0.0;
+
+ /*
+ if the previous note is longa-shaped,
+ the joining line may hide the stem, so made it longer
+ to serve as stem as well
+ */
+ if (primitive & MLP_LONGA)
+ y_bottom -= stem_length + 0.25 * blotdiameter;
+ }
+
+ Interval x_extent (width - thickness, width);
+ Interval y_extent (y_bottom, y_top);
+ Box join_box (x_extent, y_extent);
+ Stencil join = Lookup::round_filled_box (join_box, blotdiameter);
+
+ out.add_stencil (join);
+ }