+
+ // 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));
+
+ Direction d = LEFT;
+ do
+ {
+ if (connect_to_other[d])
+ {
+ edge_height[d] = 0.0;
+ flare[d] = 0.0;
+ shorten[d] = 0.0;
+ }
+ }
+ while (flip (&d) != LEFT);
+
+ /*
+ 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);
+}
+
+
+Stencil
+Horizontal_bracket::make_enclosing_bracket (Grob *me, Grob *refpoint,
+ vector<Grob*> grobs,
+ Axis a, Direction dir)
+{
+ Grob *common = common_refpoint_of_array (grobs, refpoint, a);
+ Interval ext = Axis_group_interface::relative_group_extent (grobs, common, a);
+
+ if (ext.is_empty ())
+ {
+ me->programming_error ("Can't enclose empty extents with bracket");
+ return Stencil ();
+ }
+ else
+ {
+ Stencil b = make_bracket (me, ext.length (), a, dir);
+ b.translate_axis (ext[LEFT] - refpoint->relative_coordinate (common, a), a);
+
+ return b;
+ }
+}