OLD | NEW |
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) 2012 Mike Solomon <mike@mikesolomon.org> | 4 Copyright (C) 2012 Mike Solomon <mike@mikesolomon.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 |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 | 887 |
888 /* | 888 /* |
889 traverses a stencil expression, returning a vector of Transform_matrix_and_exp
ression | 889 traverses a stencil expression, returning a vector of Transform_matrix_and_exp
ression |
890 the struct Transform_matrix_and_expression contains two members, | 890 the struct Transform_matrix_and_expression contains two members, |
891 a Transform_matrix that indicates where to move a stencil and the stencil expr
ession | 891 a Transform_matrix that indicates where to move a stencil and the stencil expr
ession |
892 to show how to construct the stencil | 892 to show how to construct the stencil |
893 */ | 893 */ |
894 vector<Transform_matrix_and_expression> | 894 vector<Transform_matrix_and_expression> |
895 stencil_traverser (PangoMatrix trans, SCM expr) | 895 stencil_traverser (PangoMatrix trans, SCM expr) |
896 { | 896 { |
897 if (scm_is_null (expr)) | 897 if (scm_is_null (expr) |
898 return vector<Transform_matrix_and_expression> (); | 898 || (scm_is_string (expr) && scm_is_true (scm_string_null_p (expr)))) |
899 else if (scm_is_eq (expr, ly_string2scm (""))) | |
900 return vector<Transform_matrix_and_expression> (); | 899 return vector<Transform_matrix_and_expression> (); |
901 else if (scm_is_eq (scm_car (expr), ly_symbol2scm ("combine-stencil"))) | 900 else if (scm_is_eq (scm_car (expr), ly_symbol2scm ("combine-stencil"))) |
902 { | 901 { |
903 vector<Transform_matrix_and_expression> out; | 902 vector<Transform_matrix_and_expression> out; |
904 for (SCM s = scm_cdr (expr); scm_is_pair (s); s = scm_cdr (s)) | 903 for (SCM s = scm_cdr (expr); scm_is_pair (s); s = scm_cdr (s)) |
905 { | 904 { |
906 vector<Transform_matrix_and_expression> res = | 905 vector<Transform_matrix_and_expression> res = |
907 stencil_traverser (trans, scm_car (s)); | 906 stencil_traverser (trans, scm_car (s)); |
908 out.insert (out.end (), res.begin (), res.end ()); | 907 out.insert (out.end (), res.begin (), res.end ()); |
909 } | 908 } |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 | 1151 |
1153 MAKE_SCHEME_CALLBACK (Grob, pure_horizontal_skylines_from_element_stencils, 3); | 1152 MAKE_SCHEME_CALLBACK (Grob, pure_horizontal_skylines_from_element_stencils, 3); |
1154 SCM | 1153 SCM |
1155 Grob::pure_horizontal_skylines_from_element_stencils (SCM smob, SCM beg_scm, SCM
end_scm) | 1154 Grob::pure_horizontal_skylines_from_element_stencils (SCM smob, SCM beg_scm, SCM
end_scm) |
1156 { | 1155 { |
1157 Grob *me = unsmob<Grob> (smob); | 1156 Grob *me = unsmob<Grob> (smob); |
1158 int beg = robust_scm2int (beg_scm, 0); | 1157 int beg = robust_scm2int (beg_scm, 0); |
1159 int end = robust_scm2int (end_scm, 0); | 1158 int end = robust_scm2int (end_scm, 0); |
1160 return internal_skylines_from_element_stencils (me, Y_AXIS, true, beg, end); | 1159 return internal_skylines_from_element_stencils (me, Y_AXIS, true, beg, end); |
1161 } | 1160 } |
OLD | NEW |