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) 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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 bool beam_segment_less (Beam_segment const &a, Beam_segment const &b); | 36 bool beam_segment_less (Beam_segment const &a, Beam_segment const &b); |
37 | 37 |
38 struct Beam_stem_segment | 38 struct Beam_stem_segment |
39 { | 39 { |
40 Beam_stem_segment (); | 40 Beam_stem_segment (); |
41 | 41 |
42 Grob *stem_; | 42 Grob *stem_; |
43 Real width_; | 43 Real width_; |
44 Real stem_x_; | 44 Real stem_x_; |
45 int rank_; | 45 vsize rank_; |
46 vsize stem_index_; | 46 vsize stem_index_; |
47 bool gapped_; | 47 bool gapped_; |
48 Direction dir_; | 48 Direction dir_; |
49 int max_connect_; | 49 int max_connect_; |
50 }; | 50 }; |
51 | 51 |
52 bool operator <(Beam_stem_segment const &a, Beam_stem_segment const &b); | 52 bool operator <(Beam_stem_segment const &a, Beam_stem_segment const &b); |
53 | 53 |
54 class Beam | 54 class Beam |
55 { | 55 { |
56 public: | 56 public: |
57 static int normal_stem_count (Grob *); | 57 static vsize normal_stem_count (Grob *); |
58 static Grob *first_normal_stem (Grob *); | 58 static Grob *first_normal_stem (Grob *); |
59 static Grob *last_normal_stem (Grob *); | 59 static Grob *last_normal_stem (Grob *); |
60 static void add_stem (Grob *, Grob *); | 60 static void add_stem (Grob *, Grob *); |
61 static bool is_cross_staff (Grob *); | 61 static bool is_cross_staff (Grob *); |
62 static bool is_knee (Grob *); | 62 static bool is_knee (Grob *); |
63 static void set_beaming (Grob *, Beaming_pattern const *); | 63 static void set_beaming (Grob *, Beaming_pattern const *); |
64 static void set_stemlens (Grob *); | 64 static void set_stemlens (Grob *); |
65 static int get_beam_count (Grob *me); | 65 static int get_beam_count (Grob *me); |
66 static Real get_beam_translation (Grob *me); | 66 static Real get_beam_translation (Grob *me); |
67 static Real get_beam_thickness (Grob *me); | 67 static Real get_beam_thickness (Grob *me); |
(...skipping 17 matching lines...) Expand all Loading... |
85 static int get_direction_beam_count (Grob *me, Direction d); | 85 static int get_direction_beam_count (Grob *me, Direction d); |
86 | 86 |
87 private: | 87 private: |
88 friend class Beam_scoring_problem; | 88 friend class Beam_scoring_problem; |
89 | 89 |
90 static Direction get_default_dir (Grob *); | 90 static Direction get_default_dir (Grob *); |
91 static vector<Beam_segment> get_beam_segments (Grob *); | 91 static vector<Beam_segment> get_beam_segments (Grob *); |
92 static void set_stem_directions (Grob *, Direction); | 92 static void set_stem_directions (Grob *, Direction); |
93 static void consider_auto_knees (Grob *); | 93 static void consider_auto_knees (Grob *); |
94 static void set_stem_shorten (Grob *); | 94 static void set_stem_shorten (Grob *); |
95 static int forced_stem_count (Grob *); | 95 static vsize forced_stem_count (Grob *); |
96 static Real calc_stem_y (Grob *, Grob *s, Grob **c, | 96 static Real calc_stem_y (Grob *, Grob *s, Grob **c, |
97 Real, Real, Direction, | 97 Real, Real, Direction, |
98 Drul_array<Real> pos, bool french); | 98 Drul_array<Real> pos, bool french); |
99 }; | 99 }; |
100 | 100 |
101 #endif /* BEAM_HH */ | 101 #endif /* BEAM_HH */ |
102 | 102 |
OLD | NEW |