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--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1996--2011 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 Grob *cy = script->common_refpoint (slur, Y_AXIS); | 264 Grob *cy = script->common_refpoint (slur, Y_AXIS); |
265 | 265 |
266 Bezier curve = Slur::get_curve (slur); | 266 Bezier curve = Slur::get_curve (slur); |
267 | 267 |
268 curve.translate (Offset (slur->relative_coordinate (cx, X_AXIS), | 268 curve.translate (Offset (slur->relative_coordinate (cx, X_AXIS), |
269 slur->relative_coordinate (cy, Y_AXIS))); | 269 slur->relative_coordinate (cy, Y_AXIS))); |
270 | 270 |
271 Interval yext = robust_relative_extent (script, cy, Y_AXIS); | 271 Interval yext = robust_relative_extent (script, cy, Y_AXIS); |
272 Interval xext = robust_relative_extent (script, cx, X_AXIS); | 272 Interval xext = robust_relative_extent (script, cx, X_AXIS); |
273 Interval slur_wid (curve.control_[0][X_AXIS], curve.control_[3][X_AXIS]); | 273 Interval slur_wid (curve.control_[0][X_AXIS], curve.control_[3][X_AXIS]); |
| 274 |
| 275 // cannot use is empty because some 0-extent scripts |
| 276 // come up with TabStaffs |
| 277 if (xext.length () <= 0 || yext.length () <= 0) |
| 278 return offset_scm; |
274 | 279 |
275 bool contains = false; | 280 bool contains = false; |
276 Direction d = LEFT; | 281 Direction d = LEFT; |
277 do | 282 do |
278 contains |= slur_wid.contains (xext[d]); | 283 contains |= slur_wid.contains (xext[d]); |
279 while (flip (&d) != LEFT); | 284 while (flip (&d) != LEFT); |
280 | 285 |
281 if (!contains) | 286 if (!contains) |
282 return offset_scm; | 287 return offset_scm; |
283 | 288 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 "height-limit " | 509 "height-limit " |
505 "inspect-quants " | 510 "inspect-quants " |
506 "inspect-index " | 511 "inspect-index " |
507 "line-thickness " | 512 "line-thickness " |
508 "note-columns " | 513 "note-columns " |
509 "positions " | 514 "positions " |
510 "ratio " | 515 "ratio " |
511 "thickness " | 516 "thickness " |
512 ); | 517 ); |
513 | 518 |
LEFT | RIGHT |