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) 2000--2012 Jan Nieuwenhuizen <janneke@gnu.org> | 4 Copyright (C) 2000--2012 Jan Nieuwenhuizen <janneke@gnu.org> |
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 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 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/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 #include "align-interface.hh" | 20 #include "align-interface.hh" |
21 #include "axis-group-interface.hh" | 21 #include "axis-group-interface.hh" |
22 #include "font-interface.hh" | 22 #include "font-interface.hh" |
23 #include "grob-interface.hh" | 23 #include "grob-interface.hh" |
| 24 #include "international.hh" |
24 #include "item.hh" | 25 #include "item.hh" |
25 #include "lily-proto.hh" | 26 #include "lily-proto.hh" |
26 #include "line-interface.hh" | 27 #include "line-interface.hh" |
27 #include "note-column.hh" | 28 #include "note-column.hh" |
28 #include "output-def.hh" | 29 #include "output-def.hh" |
29 #include "paper-column.hh" | 30 #include "paper-column.hh" |
30 #include "pointer-group-interface.hh" | 31 #include "pointer-group-interface.hh" |
31 #include "spanner.hh" | 32 #include "spanner.hh" |
32 #include "staff-symbol-referencer.hh" | 33 #include "staff-symbol-referencer.hh" |
33 #include "system.hh" | 34 #include "system.hh" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 if (line_right[X_AXIS] > line_left[X_AXIS]) | 362 if (line_right[X_AXIS] > line_left[X_AXIS]) |
362 { | 363 { |
363 line.add_stencil (Line_interface::line (me, line_left, line_right)); | 364 line.add_stencil (Line_interface::line (me, line_left, line_right)); |
364 | 365 |
365 line.add_stencil (Line_interface::arrows (me, | 366 line.add_stencil (Line_interface::arrows (me, |
366 span_points[LEFT], | 367 span_points[LEFT], |
367 span_points[RIGHT], | 368 span_points[RIGHT], |
368 arrows[LEFT], | 369 arrows[LEFT], |
369 arrows[RIGHT])); | 370 arrows[RIGHT])); |
370 } | 371 } |
| 372 else |
| 373 me->warning (_ ("Line spanner's left point is to the right of its right poin
t.")); |
371 | 374 |
372 line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS), | 375 line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS), |
373 simple_y ? 0.0 : -me->relative_coordinate (my_common_y
, Y_AXIS))); | 376 simple_y ? 0.0 : -me->relative_coordinate (my_common_y
, Y_AXIS))); |
374 | 377 |
375 return line.smobbed_copy (); | 378 return line.smobbed_copy (); |
376 } | 379 } |
377 | 380 |
378 ADD_INTERFACE (Line_spanner, | 381 ADD_INTERFACE (Line_spanner, |
379 "Generic line drawn between two objects, e.g., for use with" | 382 "Generic line drawn between two objects, e.g., for use with" |
380 " glissandi.", | 383 " glissandi.", |
381 | 384 |
382 /* properties */ | 385 /* properties */ |
383 "bound-details " | 386 "bound-details " |
384 "extra-dy " | 387 "extra-dy " |
385 "gap " | 388 "gap " |
386 "left-bound-info " | 389 "left-bound-info " |
387 "note-columns " | 390 "note-columns " |
388 "right-bound-info " | 391 "right-bound-info " |
389 "simple-Y " | 392 "simple-Y " |
390 "thickness " | 393 "thickness " |
391 "to-barline " | 394 "to-barline " |
392 ); | 395 ); |
LEFT | RIGHT |