A Dynamic Programming type of algorithm
similar to TeX's is in Gourlay_breaking
-
UGH. Should think about pre/post break columns.
*/
Array<Column_x_positions>
assert (breakpoints.size ()>=2);
int break_idx=0;
- int line_no = 0;
while (break_idx < breakpoints.size () -1)
{
Column_x_positions minimum;
// do another line
- line_no ++;
+
Item *post = breakpoints[break_idx]->find_prebroken_piece (RIGHT);
Paper_column *postcol =dynamic_cast<Paper_column*>(post);
current.add_paper_column (precol);
current.spacer_l_ = generate_spacing_problem (current.cols_,
- pscore_l_->paper_l_->line_dimensions_int (line_no));
+ pscore_l_->paper_l_->line_dimensions_int (breaking.size ()));
// try to solve
if (!feasible (current.cols_))
return breaking;
}
-Word_wrap::Word_wrap ()
-{
- get_line_spacer = Spring_spacer::constructor;
-}