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) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2011 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 boxes.push_back (b); | 125 boxes.push_back (b); |
126 | 126 |
127 if (Grob *stem = unsmob_grob (s->get_object ("stem"))) | 127 if (Grob *stem = unsmob_grob (s->get_object ("stem"))) |
128 stems.insert (stem); | 128 stems.insert (stem); |
129 } | 129 } |
130 | 130 |
131 for (set<Grob *>::const_iterator i (stems.begin ()); | 131 for (set<Grob *>::const_iterator i (stems.begin ()); |
132 i != stems.end (); i++) | 132 i != stems.end (); i++) |
133 { | 133 { |
134 Grob *stem = (*i); | 134 Grob *stem = (*i); |
135 Stencil flag = Stem::flag (stem); | 135 Grob *flag = Stem::flag (stem); |
136 if (!flag.is_empty ()) | 136 if (flag) |
137 { | 137 { |
138 Interval y = flag.extent (Y_AXIS) | 138 Grob *commony = stem->common_refpoint (flag, Y_AXIS); |
139 * (2 / ss) | 139 Interval y = flag->extent (commony, Y_AXIS) * (2 / ss); |
140 + stem->extent (stem, Y_AXIS)[get_grob_direction (stem)]; | 140 Interval x = flag->extent (commonx, X_AXIS); |
141 | |
142 Interval x = stem->relative_coordinate (commonx, X_AXIS) | |
143 + flag.extent (X_AXIS); | |
144 | 141 |
145 boxes.push_back (Box (x, y)); | 142 boxes.push_back (Box (x, y)); |
146 } | 143 } |
147 } | 144 } |
148 | 145 |
149 vector_sort (dots, position_less); | 146 vector_sort (dots, position_less); |
150 for (vsize i = dots.size (); i--;) | 147 for (vsize i = dots.size (); i--;) |
151 { | 148 { |
152 if (!dots[i]->is_live ()) | 149 if (!dots[i]->is_live ()) |
153 dots.erase (dots.begin () + i); | 150 dots.erase (dots.begin () + i); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 ADD_INTERFACE (Dot_column, | 228 ADD_INTERFACE (Dot_column, |
232 "Group dot objects so they form a column, and position" | 229 "Group dot objects so they form a column, and position" |
233 " dots so they do not clash with staff lines.", | 230 " dots so they do not clash with staff lines.", |
234 | 231 |
235 /* properties */ | 232 /* properties */ |
236 "dots " | 233 "dots " |
237 "positioning-done " | 234 "positioning-done " |
238 "direction " | 235 "direction " |
239 ); | 236 ); |
240 | 237 |
LEFT | RIGHT |