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) 1998--2020 Jan Nieuwenhuizen <janneke@gnu.org> | 4 Copyright (C) 1998--2020 Jan Nieuwenhuizen <janneke@gnu.org> |
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 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 // Need M_PI from math.h header. | 20 // Needed because of extension definitions for POSIX functions. |
21 #define _POSIX_SOURCE | 21 #include "config.hh" |
22 | 22 |
23 #include "misc.hh" | 23 #include "misc.hh" |
24 #include "bezier.hh" | 24 #include "bezier.hh" |
25 | 25 |
26 #include <cmath> | 26 #include <cmath> |
27 | 27 |
28 static Real | 28 static Real |
29 F0_1 (Real x) | 29 F0_1 (Real x) |
30 { | 30 { |
31 return 2 / M_PI * atan (M_PI * x / 2); | 31 return 2 / M_PI * atan (M_PI * x / 2); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 get_slur_indent_height (&indent, &height, | 124 get_slur_indent_height (&indent, &height, |
125 width, h_inf, r_0); | 125 width, h_inf, r_0); |
126 | 126 |
127 Bezier curve; | 127 Bezier curve; |
128 curve.control_[0] = Offset (0, 0); | 128 curve.control_[0] = Offset (0, 0); |
129 curve.control_[1] = Offset (indent, height); | 129 curve.control_[1] = Offset (indent, height); |
130 curve.control_[2] = Offset (width - indent, height); | 130 curve.control_[2] = Offset (width - indent, height); |
131 curve.control_[3] = Offset (width, 0); | 131 curve.control_[3] = Offset (width, 0); |
132 return curve; | 132 return curve; |
133 } | 133 } |
LEFT | RIGHT |