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--2019 Mike Solomon <mike@mikesolomon.org> | 4 Copyright (C) 2012--2019 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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 TODO: | 808 TODO: |
809 | 809 |
810 The value will be nan for whitespace, in which case we just want | 810 The value will be nan for whitespace, in which case we just want |
811 filler, so the kerned bbox is ok. | 811 filler, so the kerned bbox is ok. |
812 | 812 |
813 However, if the value is inf, this likely means that LilyPond is | 813 However, if the value is inf, this likely means that LilyPond is |
814 using a font that is currently difficult to get the measurements | 814 using a font that is currently difficult to get the measurements |
815 from the Pango_font. This should eventually be fixed. The solution | 815 from the Pango_font. This should eventually be fixed. The solution |
816 for now is just to use the bounding box. | 816 for now is just to use the bounding box. |
817 */ | 817 */ |
818 if (isnan (xlen) || isnan (ylen) || isinf (xlen) || isinf (ylen)) | 818 if (std::isnan (xlen) || std::isnan (ylen) || std::isinf (xlen) || std::is
inf (ylen)) |
819 outline = box_to_scheme_lines (kerned_bbox); | 819 outline = box_to_scheme_lines (kerned_bbox); |
820 else | 820 else |
821 { | 821 { |
822 assert (abs (xlen - ylen) < 10e-3); | 822 assert (abs (xlen - ylen) < 10e-3); |
823 | 823 |
824 Real scale_factor = max (xlen, ylen); | 824 Real scale_factor = max (xlen, ylen); |
825 // the three operations below move the stencil from its original coord
inates to current coordinates | 825 // the three operations below move the stencil from its original coord
inates to current coordinates |
826 // FIXME: this looks extremely fishy. | 826 // FIXME: this looks extremely fishy. |
827 transcopy = | 827 transcopy = |
828 robust_scm2transform (transcopy) | 828 robust_scm2transform (transcopy) |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 | 1206 |
1207 MAKE_SCHEME_CALLBACK (Grob, pure_horizontal_skylines_from_element_stencils, 3); | 1207 MAKE_SCHEME_CALLBACK (Grob, pure_horizontal_skylines_from_element_stencils, 3); |
1208 SCM | 1208 SCM |
1209 Grob::pure_horizontal_skylines_from_element_stencils (SCM smob, SCM beg_scm, SCM
end_scm) | 1209 Grob::pure_horizontal_skylines_from_element_stencils (SCM smob, SCM beg_scm, SCM
end_scm) |
1210 { | 1210 { |
1211 Grob *me = unsmob<Grob> (smob); | 1211 Grob *me = unsmob<Grob> (smob); |
1212 int beg = robust_scm2int (beg_scm, 0); | 1212 int beg = robust_scm2int (beg_scm, 0); |
1213 int end = robust_scm2int (end_scm, 0); | 1213 int end = robust_scm2int (end_scm, 0); |
1214 return internal_skylines_from_element_stencils (me, Y_AXIS, true, beg, end); | 1214 return internal_skylines_from_element_stencils (me, Y_AXIS, true, beg, end); |
1215 } | 1215 } |
OLD | NEW |