--- /dev/null
+\header {
+
+ texidoc = "Generate valid postscript even if dash-period is small
+ compared to line thickness."
+
+}
+
+\version "2.11.29"
+\relative {
+ \override Staff.OttavaBracket #'dash-period = #0.1
+ \override Score.OttavaBracket #'dash-fraction = #1
+
+ #(set-octavation 1)
+ c4 c
+}
+
{
dash_fraction = min (max (dash_fraction, 0.0), 1.0);
Real on = dash_fraction * dash_period + thick;
- Real off = dash_period - on;
+ Real off = max (0.0, dash_period - on);
SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
scm_from_double (thick),
Real len = (to-from).length ();
int n = (int) rint ((len - period * fraction) / period);
+ n = max (0, n);
if (n > 0)
{
/*
SCM markup = me->get_property ("text");
Stencil text;
if (Text_interface::is_markup (markup))
- text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, markup));
+ text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (),
+ properties, markup));
Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
Interval (0, 0));
stroke
} bind def
-/draw_dashed_line % dx dy thickness dashpattern draw_dashed_line
+/draw_dashed_line % dx dy thickness dashpattern offset draw_dashed_line
{
1 setlinecap
1 setlinejoin