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--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1996--2019 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 return 0.0; | 812 return 0.0; |
813 | 813 |
814 Real pos = Staff_symbol_referencer::get_position (lh); | 814 Real pos = Staff_symbol_referencer::get_position (lh); |
815 | 815 |
816 if (Grob *head = support_head (me)) | 816 if (Grob *head = support_head (me)) |
817 { | 817 { |
818 Interval head_height = head->extent (head, Y_AXIS); | 818 Interval head_height = head->extent (head, Y_AXIS); |
819 Real y_attach = Note_head::stem_attachment_coordinate (head, Y_AXIS); | 819 Real y_attach = Note_head::stem_attachment_coordinate (head, Y_AXIS); |
820 | 820 |
821 y_attach = head_height.linear_combination (y_attach); | 821 y_attach = head_height.linear_combination (y_attach); |
822 if (!std::isinf (y_attach) && !std::isnan (y_attach)) // empty heads | 822 if (std::isfinite (y_attach)) // empty heads |
823 pos += d * y_attach * 2 / ss; | 823 pos += d * y_attach * 2 / ss; |
824 } | 824 } |
825 | 825 |
826 return pos; | 826 return pos; |
827 } | 827 } |
828 | 828 |
829 | 829 |
830 MAKE_SCHEME_CALLBACK (Stem, pure_calc_length, 3); | 830 MAKE_SCHEME_CALLBACK (Stem, pure_calc_length, 3); |
831 SCM | 831 SCM |
832 Stem::pure_calc_length (SCM smob, SCM /*start*/, SCM /*end*/) | 832 Stem::pure_calc_length (SCM smob, SCM /*start*/, SCM /*end*/) |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 ideal_y_ = shortest_y_ = 0; | 1206 ideal_y_ = shortest_y_ = 0; |
1207 dir_ = CENTER; | 1207 dir_ = CENTER; |
1208 } | 1208 } |
1209 | 1209 |
1210 void | 1210 void |
1211 Stem_info::scale (Real x) | 1211 Stem_info::scale (Real x) |
1212 { | 1212 { |
1213 ideal_y_ *= x; | 1213 ideal_y_ *= x; |
1214 shortest_y_ *= x; | 1214 shortest_y_ *= x; |
1215 } | 1215 } |
LEFT | RIGHT |