+#include "tuplet-bracket.hh"
+#include "axis-group-interface.hh"
+#include "spanner.hh"
+#include "item.hh"
+
+Stencil
+Horizontal_bracket::make_bracket (Grob *me,
+ Real length,
+ Axis a, Direction dir)
+{
+ Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"),
+ Interval (1.0, 1.0));
+ Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
+ Interval (0, 0));
+ Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
+ Interval (0, 0));
+
+ // Make sure that it points in the correct direction:
+ scale_drul (&edge_height, Real (-dir));
+
+ Interval empty;
+ Offset start;
+ start[a] = length;
+
+ Drul_array<bool> connect_to_other
+ = robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
+ Drul_array<bool> (false, false));
+
+ for (LEFT_and_RIGHT (d))
+ {
+ if (connect_to_other[d])
+ {
+ edge_height[d] = 0.0;
+ flare[d] = 0.0;
+ shorten[d] = 0.0;
+ }
+ }
+
+ /*
+ ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
+ */
+ return Tuplet_bracket::make_bracket (me, other_axis (a), start,
+ edge_height, empty, flare, shorten);
+}