LEFT | RIGHT |
(no file at all) | |
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) 2001--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2001--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 /* | 72 /* |
73 The main factor that determines the amount of space is the width of the | 73 The main factor that determines the amount of space is the width of the |
74 note head (or the rest). For example, a quarter rest gets almost 0.5 ss | 74 note head (or the rest). For example, a quarter rest gets almost 0.5 ss |
75 less horizontal space than a note. | 75 less horizontal space than a note. |
76 | 76 |
77 The other parts of a note column (eg. flags, accidentals, etc.) don't get | 77 The other parts of a note column (eg. flags, accidentals, etc.) don't get |
78 the full amount of space. We give them half the amount of space, but then | 78 the full amount of space. We give them half the amount of space, but then |
79 adjust things so there are no collisions. | 79 adjust things so there are no collisions. |
80 */ | 80 */ |
81 Drul_array<Skyline> skys = Spacing_interface::skylines (me, right_col); | 81 Drul_array<Skyline> skys = Spacing_interface::skylines (me, right_col); |
82 Real distance = skys[LEFT].distance (skys[RIGHT]); | 82 Real distance = skys[LEFT].distance (skys[RIGHT], robust_scm2double (right_col
->get_property ("skyline-vertical-padding"), 0.0)); |
83 Real min_dist = max (0.0, distance); | 83 Real min_dist = max (0.0, distance); |
84 Real min_desired_space = left_head_end + (min_dist - left_head_end + base_spac
e - increment) / 2; | 84 Real min_desired_space = left_head_end + (min_dist - left_head_end + base_spac
e - increment) / 2; |
85 Real ideal = base_space - increment + left_head_end; | 85 Real ideal = base_space - increment + left_head_end; |
86 | 86 |
87 /* If we have a NonMusical column on the right, we measure the ideal distance | 87 /* If we have a NonMusical column on the right, we measure the ideal distance |
88 to the bar-line (if present), not the start of the column. */ | 88 to the bar-line (if present), not the start of the column. */ |
89 if (!Paper_column::is_musical (right_col) | 89 if (!Paper_column::is_musical (right_col) |
90 && !skys[RIGHT].is_empty () | 90 && !skys[RIGHT].is_empty () |
91 && to_boolean (me->get_property ("space-to-barline"))) | 91 && to_boolean (me->get_property ("space-to-barline"))) |
92 { | 92 { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 /* properties */ | 324 /* properties */ |
325 "knee-spacing-correction " | 325 "knee-spacing-correction " |
326 "left-items " | 326 "left-items " |
327 "right-items " | 327 "right-items " |
328 "same-direction-correction " | 328 "same-direction-correction " |
329 "stem-spacing-correction " | 329 "stem-spacing-correction " |
330 "space-to-barline " | 330 "space-to-barline " |
331 ); | 331 ); |
332 | 332 |
LEFT | RIGHT |