Offset my_off;
Offset his_off;
+ Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
+ 0.0);
+
if (bound[RIGHT]->break_status_dir ())
{
if (bound[LEFT]->break_status_dir ())
anymore. We have to find the piano-staff object.
*/
- int k = broken_spanner_index (me);
- Spanner *parent_sp = dynamic_cast<Spanner *> (me->original ());
- Spanner *next_sp = parent_sp->broken_intos_ [k + 1];
+ Spanner *next_sp = me->broken_neighbor (RIGHT);
Item *next_bound = next_sp->get_bound (RIGHT);
if (next_bound->break_status_dir ())
Real yoff = this_common_y->relative_coordinate (all_common_y, Y_AXIS);
Offset p1 (bound[LEFT]->extent (commonx, X_AXIS)[RIGHT],
- this_ext.center () + yoff);
+ this_ext.center () + yoff - extra_dy / 2);
Offset p2 (bound[RIGHT]->extent (commonx, X_AXIS)[LEFT],
- next_ext.center () + yoff);
+ next_ext.center () + yoff + extra_dy / 2);
- Offset dz (p2 -p1);
+ Offset dz (p2 - p1);
Real len = dz.length ();
Offset dir = dz * (1 / len);
his_off[ax] = bound[LEFT]->relative_coordinate (common[a], ax);
}
- ofxy = dxy * (off / dxy.length ());
+ ofxy = dxy * (off / dxy.length ()) ;
dxy -= 2*ofxy;
+ dxy[Y_AXIS] += extra_dy;
+
Stencil line = line_stencil (me, Offset (0, 0), dxy);
line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length () / 2, X_AXIS);
- line.translate (ofxy - my_off + his_off);
+ line.translate (ofxy - my_off + his_off + Offset (0, -extra_dy/2));
return line.smobbed_copy ();
}
}
-ADD_INTERFACE (Line_spanner, "line-spanner-interface",
+ADD_INTERFACE (Line_spanner,
"Generic line drawn between two objects, e.g. for use with glissandi.\n"
"The property @code{style} can be @code{line}, "
"@code{dashed-line}, @code{trill}, \n"
"@code{dotted-line} or @code{zigzag}.\n"
"\n",
- "gap zigzag-width zigzag-length thickness arrow");
+
+ "extra-dy "
+ "arrow "
+ "gap "
+ "thickness "
+ "zigzag-length "
+ "zigzag-width "
+ );