LEFT | RIGHT |
(no file at all) | |
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--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1996--2012 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 13 matching lines...) Expand all Loading... |
24 #include "beam.hh" | 24 #include "beam.hh" |
25 #include "bezier.hh" | 25 #include "bezier.hh" |
26 #include "directional-element-interface.hh" | 26 #include "directional-element-interface.hh" |
27 #include "font-interface.hh" | 27 #include "font-interface.hh" |
28 #include "item.hh" | 28 #include "item.hh" |
29 #include "pointer-group-interface.hh" | 29 #include "pointer-group-interface.hh" |
30 #include "lookup.hh" | 30 #include "lookup.hh" |
31 #include "main.hh" // DEBUG_SLUR_SCORING | 31 #include "main.hh" // DEBUG_SLUR_SCORING |
32 #include "note-column.hh" | 32 #include "note-column.hh" |
33 #include "output-def.hh" | 33 #include "output-def.hh" |
| 34 #include "skyline-pair.hh" |
34 #include "spanner.hh" | 35 #include "spanner.hh" |
35 #include "skyline-pair.hh" | |
36 #include "staff-symbol-referencer.hh" | 36 #include "staff-symbol-referencer.hh" |
37 #include "stem.hh" | 37 #include "stem.hh" |
38 #include "text-interface.hh" | 38 #include "text-interface.hh" |
39 #include "tie.hh" | 39 #include "tie.hh" |
40 #include "warn.hh" | 40 #include "warn.hh" |
41 #include "slur-scoring.hh" | 41 #include "slur-scoring.hh" |
42 #include "separation-item.hh" | 42 #include "separation-item.hh" |
43 #include "international.hh" | 43 #include "international.hh" |
44 | 44 |
45 MAKE_SCHEME_CALLBACK (Slur, calc_direction, 1) | 45 MAKE_SCHEME_CALLBACK (Slur, calc_direction, 1) |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 if (do_shift) | 357 if (do_shift) |
358 break; | 358 break; |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 Real avoidance_offset = do_shift ? curve.minmax (X_AXIS, max (xext[LEFT], curv
e.control_[0][X_AXIS] + EPS), min (xext[RIGHT], curve.control_[3][X_AXIS] - EPS)
, dir) - yext[-dir] : 0.0; | 362 Real avoidance_offset = do_shift ? curve.minmax (X_AXIS, max (xext[LEFT], curv
e.control_[0][X_AXIS] + EPS), min (xext[RIGHT], curve.control_[3][X_AXIS] - EPS)
, dir) - yext[-dir] : 0.0; |
363 | 363 |
364 return scm_from_double (offset + avoidance_offset); | 364 return scm_from_double (offset + avoidance_offset); |
365 } | 365 } |
366 | 366 |
367 MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, vertical_skylines, 1, 0, ""); | 367 MAKE_SCHEME_CALLBACK (Slur, vertical_skylines, 1); |
368 SCM | 368 SCM |
369 Slur::vertical_skylines (SCM smob) | 369 Slur::vertical_skylines (SCM smob) |
370 { | 370 { |
371 Grob *me = unsmob_grob (smob); | 371 Grob *me = unsmob_grob (smob); |
372 vector<Box> boxes; | 372 vector<Box> boxes; |
373 | 373 |
374 if (!me) | 374 if (!me) |
375 return Skyline_pair (boxes, 0.0, X_AXIS).smobbed_copy (); | 375 return Skyline_pair (boxes, X_AXIS).smobbed_copy (); |
376 | 376 |
377 Bezier curve = Slur::get_curve (me); | 377 Bezier curve = Slur::get_curve (me); |
378 vsize box_count = robust_scm2vsize (me->get_property ("skyline-quantizing"), 1
0); | 378 vsize box_count = robust_scm2vsize (me->get_property ("skyline-quantizing"), 1
0); |
379 for (vsize i = 0; i < box_count; i++) | 379 for (vsize i = 0; i < box_count; i++) |
380 { | 380 { |
381 Box b; | 381 Box b; |
382 b.add_point (curve.curve_point (i * 1.0 / box_count)); | 382 b.add_point (curve.curve_point (i * 1.0 / box_count)); |
383 b.add_point (curve.curve_point ((i + 1) * 1.0 / box_count)); | 383 b.add_point (curve.curve_point ((i + 1) * 1.0 / box_count)); |
384 boxes.push_back (b); | 384 boxes.push_back (b); |
385 } | 385 } |
386 | 386 |
387 return Skyline_pair (boxes, 0.0, X_AXIS).smobbed_copy (); | 387 return Skyline_pair (boxes, X_AXIS).smobbed_copy (); |
388 } | 388 } |
389 | 389 |
390 /* | 390 /* |
391 * Used by Slur_engraver:: and Phrasing_slur_engraver:: | 391 * Used by Slur_engraver:: and Phrasing_slur_engraver:: |
392 */ | 392 */ |
393 void | 393 void |
394 Slur::auxiliary_acknowledge_extra_object (Grob_info const &info, | 394 Slur::auxiliary_acknowledge_extra_object (Grob_info const &info, |
395 vector<Grob *> &slurs, | 395 vector<Grob *> &slurs, |
396 vector<Grob *> &end_slurs) | 396 vector<Grob *> &end_slurs) |
397 { | 397 { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 "dash-definition " | 555 "dash-definition " |
556 "details " | 556 "details " |
557 "direction " | 557 "direction " |
558 "eccentricity " | 558 "eccentricity " |
559 "encompass-objects " | 559 "encompass-objects " |
560 "height-limit " | 560 "height-limit " |
561 "inspect-quants " | 561 "inspect-quants " |
562 "inspect-index " | 562 "inspect-index " |
563 "line-thickness " | 563 "line-thickness " |
564 "note-columns " | 564 "note-columns " |
565 "skyline-quantizing " | |
566 "positions " | 565 "positions " |
567 "ratio " | 566 "ratio " |
568 "thickness " | 567 "thickness " |
569 "vertical-skylines " | |
570 ); | 568 ); |
571 | 569 |
LEFT | RIGHT |