LEFT | RIGHT |
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) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1998--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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines, 1); | 86 MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines, 1); |
87 SCM | 87 SCM |
88 Separation_item::calc_skylines (SCM smob) | 88 Separation_item::calc_skylines (SCM smob) |
89 { | 89 { |
90 Item *me = unsmob_item (smob); | 90 Item *me = unsmob_item (smob); |
91 vector<Box> bs = boxes (me, 0); | 91 vector<Box> bs = boxes (me, 0); |
92 Skyline_pair sp (bs, Y_AXIS); | 92 Skyline_pair sp (bs, Y_AXIS); |
93 /* | 93 /* |
94 TODO: We need to decide if padding is 'intrinsic' | 94 TODO: We need to decide if padding is 'intrinsic' |
95 to a skyline or if it is something that is only added on in | 95 to a skyline or if it is something that is only added on in |
96 distance calculations. Here, we make it intrinsic. | 96 distance calculations. Here, we make it intrinsic, which copies |
| 97 the behavior from the old code but no longer corresponds to how |
| 98 vertical skylines are handled (where padding is not built into |
| 99 the skyline). |
97 */ | 100 */ |
98 Real vp = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.
0); | 101 Real vp = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.
0); |
99 sp[LEFT] = sp[LEFT].padded (vp); | 102 sp[LEFT] = sp[LEFT].padded (vp); |
100 sp[RIGHT] = sp[RIGHT].padded (vp); | 103 sp[RIGHT] = sp[RIGHT].padded (vp); |
101 return sp.smobbed_copy (); | 104 return sp.smobbed_copy (); |
102 } | 105 } |
103 | 106 |
104 /* if left is non-NULL, get the boxes corresponding to the | 107 /* if left is non-NULL, get the boxes corresponding to the |
105 conditional-elements (conditioned on the grob LEFT). This | 108 conditional-elements (conditioned on the grob LEFT). This |
106 sounds more general than it is: conditional-elements are | 109 sounds more general than it is: conditional-elements are |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 "Item that computes widths to generate spacing rods.", | 183 "Item that computes widths to generate spacing rods.", |
181 | 184 |
182 /* properties */ | 185 /* properties */ |
183 "X-extent " | 186 "X-extent " |
184 "conditional-elements " | 187 "conditional-elements " |
185 "elements " | 188 "elements " |
186 "padding " | 189 "padding " |
187 "horizontal-skylines " | 190 "horizontal-skylines " |
188 "skyline-vertical-padding " | 191 "skyline-vertical-padding " |
189 ); | 192 ); |
LEFT | RIGHT |