LEFT | RIGHT |
(no file at all) | |
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) 1999--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1999--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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 SCM reldir = me->get_property ("side-relative-direction"); | 71 SCM reldir = me->get_property ("side-relative-direction"); |
72 if (is_direction (reldir)) | 72 if (is_direction (reldir)) |
73 relative_dir = to_dir (reldir); | 73 relative_dir = to_dir (reldir); |
74 | 74 |
75 SCM other_elt = me->get_object ("direction-source"); | 75 SCM other_elt = me->get_object ("direction-source"); |
76 Grob *e = unsmob_grob (other_elt); | 76 Grob *e = unsmob_grob (other_elt); |
77 if (e) | 77 if (e) |
78 return (Direction) (relative_dir * get_grob_direction (e)); | 78 return (Direction) (relative_dir * get_grob_direction (e)); |
79 | 79 |
80 return CENTER; | 80 return CENTER; |
| 81 } |
| 82 |
| 83 MAKE_SCHEME_CALLBACK (Script_interface, calc_opposite_direction, 1); |
| 84 SCM |
| 85 Script_interface::calc_opposite_direction (SCM smob) |
| 86 { |
| 87 return scm_product (scm_from_int (-1), calc_direction (smob)); |
81 } | 88 } |
82 | 89 |
83 MAKE_SCHEME_CALLBACK (Script_interface, calc_direction, 1); | 90 MAKE_SCHEME_CALLBACK (Script_interface, calc_direction, 1); |
84 SCM | 91 SCM |
85 Script_interface::calc_direction (SCM smob) | 92 Script_interface::calc_direction (SCM smob) |
86 { | 93 { |
87 Grob *me = unsmob_grob (smob); | 94 Grob *me = unsmob_grob (smob); |
88 Direction d = Script_interface::get_direction (me); | 95 Direction d = Script_interface::get_direction (me); |
89 | 96 |
90 if (!d) | 97 if (!d) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 "direction-source " | 163 "direction-source " |
157 "positioning-done " | 164 "positioning-done " |
158 "script-priority " | 165 "script-priority " |
159 "script-stencil " | 166 "script-stencil " |
160 "side-relative-direction " | 167 "side-relative-direction " |
161 "slur " | 168 "slur " |
162 "slur-padding " | 169 "slur-padding " |
163 "toward-stem-shift " | 170 "toward-stem-shift " |
164 ); | 171 ); |
165 | 172 |
LEFT | RIGHT |