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 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 #include "staff-spacing.hh" | 20 #include "staff-spacing.hh" |
21 | 21 |
22 #include <cstdio> | 22 #include <cstdio> |
23 using namespace std; | 23 using namespace std; |
24 | 24 |
25 #include "international.hh" | 25 #include "international.hh" |
26 #include "paper-column.hh" | 26 #include "paper-column.hh" |
27 #include "separation-item.hh" | 27 #include "separation-item.hh" |
28 #include "warn.hh" | 28 #include "warn.hh" |
29 #include "bar-line.hh" | |
30 #include "staff-symbol-referencer.hh" | 29 #include "staff-symbol-referencer.hh" |
31 #include "note-column.hh" | 30 #include "note-column.hh" |
32 #include "stem.hh" | 31 #include "stem.hh" |
33 #include "spacing-interface.hh" | 32 #include "spacing-interface.hh" |
34 #include "accidental-placement.hh" | 33 #include "accidental-placement.hh" |
35 #include "pointer-group-interface.hh" | 34 #include "pointer-group-interface.hh" |
36 #include "directional-element-interface.hh" | 35 #include "directional-element-interface.hh" |
37 | 36 |
38 /* A stem following a bar-line creates an optical illusion similar to the | 37 /* A stem following a bar-line creates an optical illusion similar to the |
39 one mentioned in note-spacing.cc. We correct for it here. | 38 one mentioned in note-spacing.cc. We correct for it here. |
(...skipping 28 matching lines...) Expand all Loading... |
68 } | 67 } |
69 | 68 |
70 /* | 69 /* |
71 Y-positions that are covered by BAR_GROB, in the case that it is a | 70 Y-positions that are covered by BAR_GROB, in the case that it is a |
72 barline. */ | 71 barline. */ |
73 Interval | 72 Interval |
74 Staff_spacing::bar_y_positions (Grob *bar_grob) | 73 Staff_spacing::bar_y_positions (Grob *bar_grob) |
75 { | 74 { |
76 Interval bar_size; | 75 Interval bar_size; |
77 bar_size.set_empty (); | 76 bar_size.set_empty (); |
78 if (Bar_line::has_interface (bar_grob)) | 77 |
| 78 if (bar_grob->internal_has_interface (ly_symbol2scm ("bar-line-interface"))) |
79 { | 79 { |
80 SCM glyph = bar_grob->get_property ("glyph-name"); | 80 SCM glyph = bar_grob->get_property ("glyph-name"); |
81 Grob *staff_sym = Staff_symbol_referencer::get_staff_symbol (bar_grob); | 81 Grob *staff_sym = Staff_symbol_referencer::get_staff_symbol (bar_grob); |
82 | 82 |
83 string glyph_string = scm_is_string (glyph) ? ly_scm2string (glyph) : ""; | 83 string glyph_string = scm_is_string (glyph) ? ly_scm2string (glyph) : ""; |
84 if (glyph_string.substr (0, 1) == "|" | 84 if (glyph_string.substr (0, 1) == "|" |
85 || glyph_string.substr (0, 1) == ".") | 85 || glyph_string.substr (0, 1) == ".") |
86 { | 86 { |
87 Grob *common = bar_grob->common_refpoint (staff_sym, Y_AXIS); | 87 Grob *common = bar_grob->common_refpoint (staff_sym, Y_AXIS); |
88 bar_size = bar_grob->extent (common, Y_AXIS); | 88 bar_size = bar_grob->extent (common, Y_AXIS); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 } | 209 } |
210 | 210 |
211 ADD_INTERFACE (Staff_spacing, | 211 ADD_INTERFACE (Staff_spacing, |
212 "This object calculates spacing details from a breakable" | 212 "This object calculates spacing details from a breakable" |
213 " symbol (left) to another object. For example, it takes care" | 213 " symbol (left) to another object. For example, it takes care" |
214 " of optical spacing from a bar line to a note.", | 214 " of optical spacing from a bar line to a note.", |
215 | 215 |
216 /* properties */ | 216 /* properties */ |
217 "stem-spacing-correction " | 217 "stem-spacing-correction " |
218 ); | 218 ); |
LEFT | RIGHT |