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) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1996--2011 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 span_data.push_back (orig->broken_intos_[i]->spanner_length ()); | 436 span_data.push_back (orig->broken_intos_[i]->spanner_length ()); |
437 | 437 |
438 vector<Interval> unnormalized_endpoints; | 438 vector<Interval> unnormalized_endpoints; |
439 | 439 |
440 for (vsize i = 0; i < span_data.size (); i++) | 440 for (vsize i = 0; i < span_data.size (); i++) |
441 { | 441 { |
442 unnormalized_endpoints.push_back (Interval (total_width, total_width +
span_data[i])); | 442 unnormalized_endpoints.push_back (Interval (total_width, total_width +
span_data[i])); |
443 total_width += span_data[i]; | 443 total_width += span_data[i]; |
444 } | 444 } |
445 | 445 |
446 orig->set_property ("length", scm_from_double (total_width)); | 446 orig->set_property ("spanner-length", scm_from_double (total_width)); |
447 for (vsize i = 0; i < unnormalized_endpoints.size (); i++) | 447 for (vsize i = 0; i < unnormalized_endpoints.size (); i++) |
448 { | 448 { |
449 SCM t = ly_interval2scm (1 / total_width * unnormalized_endpoints[i]); | 449 SCM t = ly_interval2scm (1 / total_width * unnormalized_endpoints[i]); |
450 orig->broken_intos_[i]->set_property ("length", scm_from_double (unnor
malized_endpoints[i].length ())); | 450 orig->broken_intos_[i]->set_property ("spanner-length", scm_from_doubl
e (unnormalized_endpoints[i].length ())); |
451 orig->broken_intos_[i]->set_property ("normalized-endpoints", t); | 451 orig->broken_intos_[i]->set_property ("normalized-endpoints", t); |
452 if (me->get_break_index () == i) | 452 if (me->get_break_index () == i) |
453 result = t; | 453 result = t; |
454 } | 454 } |
455 } | 455 } |
456 else | 456 else |
457 { | 457 { |
458 result = scm_cons (scm_from_double (0.0), scm_from_double (1.0)); | 458 result = scm_cons (scm_from_double (0.0), scm_from_double (1.0)); |
459 orig->set_property ("normalized-endpoints", result); | 459 orig->set_property ("normalized-endpoints", result); |
460 } | 460 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 ADD_INTERFACE (Spanner, | 541 ADD_INTERFACE (Spanner, |
542 "Some objects are horizontally spanned between objects. For" | 542 "Some objects are horizontally spanned between objects. For" |
543 " example, slurs, beams, ties, etc. These grobs form a subtype" | 543 " example, slurs, beams, ties, etc. These grobs form a subtype" |
544 " called @code{Spanner}. All spanners have two span points" | 544 " called @code{Spanner}. All spanners have two span points" |
545 " (these must be @code{Item} objects), one on the left and one" | 545 " (these must be @code{Item} objects), one on the left and one" |
546 " on the right. The left bound is also the X@tie{}reference" | 546 " on the right. The left bound is also the X@tie{}reference" |
547 " point of the spanner.", | 547 " point of the spanner.", |
548 | 548 |
549 /* properties */ | 549 /* properties */ |
550 "normalized-endpoints " | 550 "normalized-endpoints " |
551 "length " | |
552 "minimum-length " | 551 "minimum-length " |
| 552 "spanner-length " |
553 "to-barline " | 553 "to-barline " |
554 ); | 554 ); |
LEFT | RIGHT |