LEFT | RIGHT |
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) 2004--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2004--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 /* TODO: handle case of broken slur. */ | 41 /* TODO: handle case of broken slur. */ |
42 if (!ts.empty () | 42 if (!ts.empty () |
43 && (state.extremes_[LEFT].staff_ == state.extremes_[RIGHT].staff_) | 43 && (state.extremes_[LEFT].staff_ == state.extremes_[RIGHT].staff_) |
44 && state.extremes_[LEFT].staff_ && state.extremes_[RIGHT].staff_) | 44 && state.extremes_[LEFT].staff_ && state.extremes_[RIGHT].staff_) |
45 { | 45 { |
46 Real y = bez.curve_point (ts[0])[Y_AXIS]; | 46 Real y = bez.curve_point (ts[0])[Y_AXIS]; |
47 | 47 |
48 Grob *staff = state.extremes_[LEFT].staff_; | 48 Grob *staff = state.extremes_[LEFT].staff_; |
49 | 49 |
50 Real p = 2 * (y - staff->maybe_pure_coordinate (state.common_[Y_AXIS], Y_A
XIS, state.stub_, 0, INT_MAX)) | 50 Real p = 2 * (y - staff->maybe_pure_coordinate (state.common_[Y_AXIS], Y_A
XIS, state.stub_, state.spanned_rank_interval_[LEFT], state.spanned_rank_interva
l_[RIGHT])) |
51 / state.staff_space_; | 51 / state.staff_space_; |
52 | 52 |
53 Real const round = my_round (p); | 53 Real const round = my_round (p); |
54 Real const frac = p - round; | 54 Real const frac = p - round; |
55 if (fabs (frac) < 4 * state.thickness_ | 55 if (fabs (frac) < 4 * state.thickness_ |
56 && Staff_symbol_referencer::on_staff_line (staff, int (round))) | 56 && Staff_symbol_referencer::on_staff_line (staff, int (round))) |
57 { | 57 { |
58 Direction resolution_dir = frac ? state.dir_ : CENTER; | 58 Direction resolution_dir = frac ? state.dir_ : CENTER; |
59 | 59 |
60 // TODO: parameter | 60 // TODO: parameter |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 531 |
532 Slur_configuration * | 532 Slur_configuration * |
533 Slur_configuration::new_config (Drul_array<Offset> const &offs, int idx) | 533 Slur_configuration::new_config (Drul_array<Offset> const &offs, int idx) |
534 { | 534 { |
535 Slur_configuration *conf = new Slur_configuration; | 535 Slur_configuration *conf = new Slur_configuration; |
536 conf->attachment_ = offs; | 536 conf->attachment_ = offs; |
537 conf->index_ = idx; | 537 conf->index_ = idx; |
538 conf->next_scorer_todo = INITIAL_SCORE + 1; | 538 conf->next_scorer_todo = INITIAL_SCORE + 1; |
539 return conf; | 539 return conf; |
540 } | 540 } |
LEFT | RIGHT |