#include "staff-symbol-referencer.hh"
#include "lookup.hh"
#include "output-def.hh"
+#include "grob.hh"
Stencil
Line_interface::make_arrow (Offset begin, Offset end,
scm_from_double (off),
scm_from_double (to[X_AXIS] - from[X_AXIS]),
scm_from_double (to[Y_AXIS] - from[Y_AXIS]),
+ scm_from_double (0.0),
SCM_UNDEFINED);
Box box;
return stil;
}
-ADD_INTERFACE (Line_interface, "line-interface",
+ADD_INTERFACE (Line_interface,
"Generic line objects. Any object using lines supports this. Normally, "
"you get a straight line. If @code{dash-period} is defined, a dashed line is "
"produced; the length of the dashes is tuned with "
"style "
"arrow-length "
"arrow-width")
+
+
+
+/* todo: move this somewhere else? */
+Stencil
+points_to_line_stencil (vector<Offset> points)
+{
+ Stencil ret;
+ for (vsize i = 1; i < points.size (); i++)
+ {
+ if (points[i-1].is_sane () && points[i].is_sane ())
+ {
+ Stencil line
+ = Line_interface::make_line (0.1, points[i-1], points[i]);
+ ret.add_stencil (line);
+ }
+ }
+ return ret;
+}