+/*
+ Fills out all of the information contained in a Line_details,
+ except for information about horizontal spacing.
+*/
+void
+Constrained_breaking::fill_line_details (Line_details *const out, vsize start, vsize end)
+{
+ int start_rank = Paper_column::get_rank (all_[breaks_[start]]);
+ int end_rank = Paper_column::get_rank (all_[breaks_[end]]);
+ System *sys = pscore_->root_system ();
+ Interval extent = sys->pure_height (sys, start_rank, end_rank);
+
+ Grob *c = all_[breaks_[end]];
+ out->last_column_ = c;
+ out->break_penalty_ = robust_scm2double (c->get_property ("line-break-penalty"), 0);
+ out->page_penalty_ = robust_scm2double (c->get_property ("page-break-penalty"), 0);
+ out->turn_penalty_ = robust_scm2double (c->get_property ("page-turn-penalty"), 0);
+ out->break_permission_ = c->get_property ("line-break-permission");
+ out->page_permission_ = c->get_property ("page-break-permission");
+ out->turn_permission_ = c->get_property ("page-turn-permission");
+
+ /* turn permission should always be stricter than page permission
+ and page permission should always be stricter than line permission */
+ out->page_permission_ = min_permission (out->break_permission_,
+ out->page_permission_);
+ out->turn_permission_ = min_permission (out->page_permission_,
+ out->turn_permission_);
+
+ // TODO: see the hack regarding begin_of_line and
+ // rest_of_line extents in align-interface. Perhaps we
+ // should do the same thing here so that the effect extends
+ // between systems as well as within systems. It isn't as
+ // crucial here, however, because the effect is largest when
+ // dealing with large systems.
+ out->extent_ = (extent.is_empty ()
+ || isnan (extent[LEFT])
+ || isnan (extent[RIGHT]))
+ ? Interval (0, 0) : extent;
+ out->padding_ = between_system_padding_;
+ out->title_padding_ = before_title_padding_;
+ out->space_ = between_system_space_;
+ out->inverse_hooke_ = extent.length () + between_system_space_;
+}
+