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) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 | 6 |
7 LilyPond is free software: you can redistribute it and/or modify | 7 LilyPond is free software: you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation, either version 3 of the License, or | 9 the Free Software Foundation, either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 /* | 164 /* |
165 add extents of stem. | 165 add extents of stem. |
166 */ | 166 */ |
167 boxes.push_back (Box (x, y)); | 167 boxes.push_back (Box (x, y)); |
168 | 168 |
169 stem_extents_[key].unite (Box (x, y)); | 169 stem_extents_[key].unite (Box (x, y)); |
170 | 170 |
171 if (dir == LEFT) | 171 if (dir == LEFT) |
172 { | 172 { |
173 Box flag_box = Stem::get_translated_flag (stem).extent_box (); | 173 Grob *flag = Stem::flag (stem); |
174 flag_box.translate ( Offset (x[RIGHT], X_AXIS)); | 174 if (flag) |
175 boxes.push_back (flag_box); | 175 { |
| 176 Grob* commony = stem->common_refpoint (flag, Y_AXIS); |
| 177 boxes.push_back (Box (flag->extent (x_refpoint_, X_AXIS), |
| 178 flag->extent (commony, Y_AXIS))); |
| 179 } |
176 } | 180 } |
177 } | 181 } |
178 else | 182 else |
179 { | 183 { |
180 Grob *head = Stem::support_head (stem); | 184 Grob *head = Stem::support_head (stem); |
181 | 185 |
182 /* | 186 /* |
183 In case of invisible stem, don't pass x-center of heads. | 187 In case of invisible stem, don't pass x-center of heads. |
184 */ | 188 */ |
185 Real x_center = head->extent (x_refpoint_, X_AXIS).center (); | 189 Real x_center = head->extent (x_refpoint_, X_AXIS).center (); |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 { | 1231 { |
1228 for (vsize i = 0; i < base.size (); i++) | 1232 for (vsize i = 0; i < base.size (); i++) |
1229 { | 1233 { |
1230 string card = base.complete_tie_card (i); | 1234 string card = base.complete_tie_card (i); |
1231 specifications_[i].tie_grob_->set_property ("annotation", | 1235 specifications_[i].tie_grob_->set_property ("annotation", |
1232 ly_string2scm (card)); | 1236 ly_string2scm (card)); |
1233 } | 1237 } |
1234 } | 1238 } |
1235 #endif | 1239 #endif |
1236 } | 1240 } |
OLD | NEW |