+static void
+set_rods (Drul_array<Interval> const ¤t_extents,
+ Drul_array<Interval> const &previous_extents,
+ Item *current_column,
+ Item *previous_column,
+ Real min_length_fraction)
+{
+ Direction d = UP;
+ do
+ {
+ if (!current_extents[d].is_empty ()
+ && !previous_extents[d].is_empty ())
+ {
+ Real total_head_length = previous_extents[d].length ()
+ + current_extents[d].length ();
+
+ Rod rod;
+ rod.distance_ = total_head_length
+ * (3 / 2 * min_length_fraction)
+ /*
+ we go from right to left.
+ */
+ - previous_extents[d][LEFT]
+ + current_extents[d][RIGHT];
+
+ rod.item_drul_[LEFT] = current_column;
+ rod.item_drul_[RIGHT] = previous_column;
+ rod.add_to_cols ();
+ }
+ }
+ while (flip (&d) != DOWN);
+}
+