OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2006--2015 Joe Neeman <joeneeman@gmail.com> | 4 Copyright (C) 2006--2015 Joe Neeman <joeneeman@gmail.com> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 { | 35 { |
36 } | 36 } |
37 | 37 |
38 extern bool debug_page_breaking_scoring; | 38 extern bool debug_page_breaking_scoring; |
39 | 39 |
40 SCM | 40 SCM |
41 Optimal_page_breaking::solve () | 41 Optimal_page_breaking::solve () |
42 { | 42 { |
43 vsize end = last_break_position (); | 43 vsize end = last_break_position (); |
44 vsize max_sys_count = max_system_count (0, end); | 44 vsize max_sys_count = max_system_count (0, end); |
45 vsize first_page_num = robust_scm2int (book_->paper_->c_variable ("first-page-
number"), 1); | 45 int first_page_num = robust_scm2int (book_->paper_->c_variable ("first-page-nu
mber"), 1); |
46 | 46 |
47 set_to_ideal_line_configuration (0, end); | 47 set_to_ideal_line_configuration (0, end); |
48 | 48 |
49 Page_spacing_result best; | 49 Page_spacing_result best; |
50 SCM forced_page_count = book_->paper_->c_variable ("page-count"); | 50 SCM forced_page_count = book_->paper_->c_variable ("page-count"); |
51 vsize page_count = robust_scm2int (forced_page_count, 1); | 51 vsize page_count = robust_scm2int (forced_page_count, 1); |
52 Line_division ideal_line_division = current_configuration (0); | 52 Line_division ideal_line_division = current_configuration (0); |
53 Line_division best_division = ideal_line_division; | 53 Line_division best_division = ideal_line_division; |
54 vsize min_sys_count = 1; | 54 vsize min_sys_count = 1; |
55 | 55 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 && !(best.system_count_status_ & SYSTEM_COUNT_TOO_FEW)) | 212 && !(best.system_count_status_ & SYSTEM_COUNT_TOO_FEW)) |
213 break; | 213 break; |
214 } | 214 } |
215 | 215 |
216 message (_ ("Drawing systems...")); | 216 message (_ ("Drawing systems...")); |
217 break_into_pieces (0, end, best_division); | 217 break_into_pieces (0, end, best_division); |
218 SCM lines = systems (); | 218 SCM lines = systems (); |
219 return make_pages (best.systems_per_page_, lines); | 219 return make_pages (best.systems_per_page_, lines); |
220 } | 220 } |
221 | 221 |
OLD | NEW |