Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1138)

Delta Between Two Patch Sets: lily/slur-configuration.cc

Issue 6498077: Approximates cross-staff slurs in VerticalAxisGroup vertical-skylines. Base URL: http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Left Patch Set: Removes some cruft Created 12 years, 7 months ago
Right Patch Set: Better approximations Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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
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
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 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b