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) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1996--2011 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 vector<Grob*> heads (ro_heads); | 426 vector<Grob*> heads (ro_heads); |
427 vector_sort (heads, position_less); | 427 vector_sort (heads, position_less); |
428 Direction dir = get_grob_direction (me); | 428 Direction dir = get_grob_direction (me); |
429 | 429 |
430 if (dir < 0) | 430 if (dir < 0) |
431 reverse (heads); | 431 reverse (heads); |
432 | 432 |
433 Real thick = thickness (me); | 433 Real thick = thickness (me); |
434 | 434 |
435 Grob *hed = support_head (me); | 435 Grob *hed = support_head (me); |
436 if (!hed) | |
437 { | |
438 programming_error ("Stem does not connect to any note heads. Killing stem
."); | |
439 me->suicide (); | |
440 return SCM_EOL; | |
441 } | |
442 ···· | |
443 if (!dir) | 436 if (!dir) |
444 { | 437 { |
445 programming_error ("Stem dir must be up or down."); | 438 programming_error ("Stem dir must be up or down."); |
446 dir = UP; | 439 dir = UP; |
447 set_grob_direction (me, dir); | 440 set_grob_direction (me, dir); |
448 } | 441 } |
449 | 442 |
450 bool is_harmonic_centered = false; | 443 bool is_harmonic_centered = false; |
451 for (vsize i = 0; i < heads.size (); i++) | 444 for (vsize i = 0; i < heads.size (); i++) |
452 is_harmonic_centered = is_harmonic_centered· | 445 is_harmonic_centered = is_harmonic_centered· |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 ideal_y_ = shortest_y_ = 0; | 1125 ideal_y_ = shortest_y_ = 0; |
1133 dir_ = CENTER; | 1126 dir_ = CENTER; |
1134 } | 1127 } |
1135 | 1128 |
1136 void | 1129 void |
1137 Stem_info::scale (Real x) | 1130 Stem_info::scale (Real x) |
1138 { | 1131 { |
1139 ideal_y_ *= x; | 1132 ideal_y_ *= x; |
1140 shortest_y_ *= x; | 1133 shortest_y_ *= x; |
1141 } | 1134 } |
LEFT | RIGHT |