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) 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 LilyPond is free software: you can redistribute it and/or modify | 7 LilyPond is free software: you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation, either version 3 of the License, or | 9 the Free Software Foundation, either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 staffline_offs | 96 staffline_offs |
97 = Staff_symbol_referencer::on_line (stem, p) ? "0" : "1"; | 97 = Staff_symbol_referencer::on_line (stem, p) ? "0" : "1"; |
98 } | 98 } |
99 else | 99 else |
100 staffline_offs = "2"; | 100 staffline_offs = "2"; |
101 } | 101 } |
102 else | 102 else |
103 staffline_offs = ""; | 103 staffline_offs = ""; |
104 | 104 |
105 char dir = (d == UP) ? 'u' : 'd'; | 105 char dir = (d == UP) ? 'u' : 'd'; |
106 string font_char = flag_style | 106 string font_char = flag_style + dir + staffline_offs + std::to_string (log); |
107 + ::to_string (dir) + staffline_offs + ::to_string (log); | |
108 return ly_string2scm ("flags." + font_char); | 107 return ly_string2scm ("flags." + font_char); |
109 } | 108 } |
110 | 109 |
111 MAKE_SCHEME_CALLBACK (Flag, print, 1); | 110 MAKE_SCHEME_CALLBACK (Flag, print, 1); |
112 SCM | 111 SCM |
113 Flag::print (SCM smob) | 112 Flag::print (SCM smob) |
114 { | 113 { |
115 Grob *me = unsmob<Grob> (smob); | 114 Grob *me = unsmob<Grob> (smob); |
116 Grob *stem = me->get_parent (X_AXIS); | 115 Grob *stem = me->get_parent (X_AXIS); |
117 | 116 |
(...skipping 17 matching lines...) Expand all Loading... |
135 /* | 134 /* |
136 TODO: maybe property stroke-style should take different values, | 135 TODO: maybe property stroke-style should take different values, |
137 e.g. "" (i.e. no stroke), "single" and "double" (currently, it's | 136 e.g. "" (i.e. no stroke), "single" and "double" (currently, it's |
138 '() or "grace"). */ | 137 '() or "grace"). */ |
139 SCM stroke_style_scm = me->get_property ("stroke-style"); | 138 SCM stroke_style_scm = me->get_property ("stroke-style"); |
140 if (scm_is_string (stroke_style_scm)) | 139 if (scm_is_string (stroke_style_scm)) |
141 { | 140 { |
142 string stroke_style = ly_scm2string (stroke_style_scm); | 141 string stroke_style = ly_scm2string (stroke_style_scm); |
143 if (!stroke_style.empty ()) | 142 if (!stroke_style.empty ()) |
144 { | 143 { |
145 string font_char = flag_style + ::to_string (dir) + stroke_style; | 144 string font_char = flag_style + dir + stroke_style; |
146 Stencil stroke = fm->find_by_name ("flags." + font_char); | 145 Stencil stroke = fm->find_by_name ("flags." + font_char); |
147 if (stroke.is_empty ()) | 146 if (stroke.is_empty ()) |
148 { | 147 { |
149 font_char = ::to_string (dir) + stroke_style; | 148 font_char = dir + stroke_style; |
150 stroke = fm->find_by_name ("flags." + font_char); | 149 stroke = fm->find_by_name ("flags." + font_char); |
151 } | 150 } |
152 if (stroke.is_empty ()) | 151 if (stroke.is_empty ()) |
153 me->warning (_f ("flag stroke `%s' not found", font_char)); | 152 me->warning (_f ("flag stroke `%s' not found", font_char)); |
154 else | 153 else |
155 flag.add_stencil (stroke); | 154 flag.add_stencil (stroke); |
156 } | 155 } |
157 } | 156 } |
158 | 157 |
159 return flag.smobbed_copy (); | 158 return flag.smobbed_copy (); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 " what style of flag glyph is typeset on a" | 208 " what style of flag glyph is typeset on a" |
210 " @code{Stem}. Valid options include @code{'()}" | 209 " @code{Stem}. Valid options include @code{'()}" |
211 " for standard flags, @code{'mensural} and" | 210 " for standard flags, @code{'mensural} and" |
212 " @code{'no-flag}, which switches off the flag.", | 211 " @code{'no-flag}, which switches off the flag.", |
213 | 212 |
214 /* properties */ | 213 /* properties */ |
215 "glyph-name " | 214 "glyph-name " |
216 "style " | 215 "style " |
217 "stroke-style " | 216 "stroke-style " |
218 ); | 217 ); |
LEFT | RIGHT |