2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
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
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef SLUR_SCORING_HH
21 #define SLUR_SCORING_HH
24 #include "std-vector.hh"
25 #include "lily-guile.hh"
26 #include "slur-score-parameters.hh"
28 struct Extra_collision_info
36 Extra_collision_info (Grob *g, Real idx, Interval x, Interval y, Real p);
37 Extra_collision_info ();
51 Real get_point (Direction dir) const
70 Interval slur_head_x_extent_;
83 struct Slur_score_state
86 Grob *common_[NO_AXES];
93 vector<Grob *> columns_;
94 vector<Encompass_info> encompass_infos_;
95 vector<Extra_collision_info> extra_encompass_infos_;
98 Slur_score_parameters parameters_;
99 Drul_array<Bound_info> extremes_;
100 Drul_array<Offset> base_attachments_;
101 vector<Slur_configuration *> configurations_;
103 Real line_thickness_;
107 ~Slur_score_state ();
109 Slur_configuration *get_forced_configuration (Interval ys) const;
110 Slur_configuration *get_best_curve () const;
112 Direction slur_direction () const;
114 vector<Offset> generate_avoid_offsets () const;
115 Drul_array<Bound_info> get_bound_info () const;
116 void generate_curves () const;
117 vector<Slur_configuration *> enumerate_attachments (Drul_array<Real> end_ys) const;
118 Drul_array<Offset> get_base_attachments () const;
119 Drul_array<Real> get_y_attachment_range () const;
120 Encompass_info get_encompass_info (Grob *col) const;
121 vector<Extra_collision_info> get_extra_encompass_infos () const;
122 Real move_away_from_staffline (Real y, Grob *on_staff) const;
124 Interval breakable_bound_extent (Direction) const;
127 void set_slur_control_points (Grob *me);
129 #endif /* SLUR_SCORING_HH */