Left: | ||
Right: |
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) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 Jan Nieuwenhuizen <janneke@gnu.org> | 5 Jan Nieuwenhuizen <janneke@gnu.org> |
6 | 6 |
7 TODO: This is way too hairy | 7 TODO: This is way too hairy |
8 | 8 |
9 TODO: fix naming. | 9 TODO: fix naming. |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 void | 120 void |
121 Stem::set_stem_positions (Grob *me, Real se) | 121 Stem::set_stem_positions (Grob *me, Real se) |
122 { | 122 { |
123 // todo: margins | 123 // todo: margins |
124 Direction d = get_grob_direction (me); | 124 Direction d = get_grob_direction (me); |
125 | 125 |
126 Grob *beam = unsmob_grob (me->get_object ("beam")); | 126 Grob *beam = unsmob_grob (me->get_object ("beam")); |
127 if (d && d * head_positions (me)[get_grob_direction (me)] >= se * d) | 127 if (d && d * head_positions (me)[get_grob_direction (me)] >= se * d) |
128 me->warning (_ ("weird stem size, check for narrow beams")); | 128 me->warning (_ ("weird stem size, check for narrow beams")); |
129 | 129 |
130 Interval height = me->pure_height (me, 0, INT_MAX); | 130 // trigger note collision mechanisms |
131 Real stem_beg = internal_calc_stem_begin_position (me, false); | |
Keith
2012/04/02 07:42:55
I'm assuming something within calc_stem_begin_posi
MikeSol
2012/04/02 07:48:11
Yup. It allows calc_stem_position to skip all of
Keith
2012/04/04 04:02:47
That was nonsense. Note-collision resolution happ
| |
131 Real staff_space = Staff_symbol_referencer::staff_space (me); | 132 Real staff_space = Staff_symbol_referencer::staff_space (me); |
132 Real half_space = staff_space * 0.5; | 133 Real half_space = staff_space * 0.5; |
133 | 134 |
135 Interval height; | |
136 height[-d] = stem_beg * half_space; | |
134 height[d] = se * half_space + beam_end_corrective (me); | 137 height[d] = se * half_space + beam_end_corrective (me); |
135 | 138 |
136 Real stemlet_length = robust_scm2double (me->get_property ("stemlet-length"), | 139 Real stemlet_length = robust_scm2double (me->get_property ("stemlet-length"), |
137 0.0); | 140 0.0); |
138 bool stemlet = stemlet_length > 0.0; | 141 bool stemlet = stemlet_length > 0.0; |
139 | 142 |
140 Grob *lh = get_reference_head (me); | 143 Grob *lh = get_reference_head (me); |
141 | 144 |
142 if (!lh) | 145 if (!lh) |
143 { | 146 { |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1148 ideal_y_ = shortest_y_ = 0; | 1151 ideal_y_ = shortest_y_ = 0; |
1149 dir_ = CENTER; | 1152 dir_ = CENTER; |
1150 } | 1153 } |
1151 | 1154 |
1152 void | 1155 void |
1153 Stem_info::scale (Real x) | 1156 Stem_info::scale (Real x) |
1154 { | 1157 { |
1155 ideal_y_ *= x; | 1158 ideal_y_ *= x; |
1156 shortest_y_ *= x; | 1159 shortest_y_ *= x; |
1157 } | 1160 } |
OLD | NEW |