-
- Real st = dir ? hp[dir] + dir * length : 0;
-
- /* TODO: change name to extend-stems to staff/center/'() */
- bool no_extend_b = to_boolean (me->get_property ("no-stem-extend"));
- if (!no_extend_b && dir * st < 0)
- st = 0.0;
-
- /* Make a little room if we have a upflag and there is a dot.
- previous approach was to lengthen the stem. This is not
- good typesetting practice. */
- if (!get_beam (me) && dir == UP
- && durlog > 2)
- {
- Grob * closest_to_flag = extremal_heads (me)[dir];
- Grob * dots = closest_to_flag
- ? Rhythmic_head::get_dots (closest_to_flag ) : 0;
-
- if (dots)
- {
- Real dp = Staff_symbol_referencer::get_position (dots);
- Real flagy = flag (me).extent (Y_AXIS)[-dir] * 2 / ss;
-
- /* Very gory: add myself to the X-support of the parent,
- which should be a dot-column. */
- if (dir * (st + flagy - dp) < 0.5)
- {
- Grob *par = dots->get_parent (X_AXIS);
-
- if (Dot_column::has_interface (par))
- {
- Side_position_interface::add_support (par, me);
-
- /* TODO: apply some better logic here. The flag is
- curved inwards, so this will typically be too
- much. */
- }
- }
- }
- }
- return st;