OLD | NEW |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 (beam (ly:grob-object grob 'beam))) | 81 (beam (ly:grob-object grob 'beam))) |
82 (if (null? beam) | 82 (if (null? beam) |
83 (abs (- (ly:stem::calc-stem-end-position grob) beg)) | 83 (abs (- (ly:stem::calc-stem-end-position grob) beg)) |
84 (begin | 84 (begin |
85 (ly:programming-error | 85 (ly:programming-error |
86 "stem::length called but will not be used for beamed stem.") | 86 "stem::length called but will not be used for beamed stem.") |
87 0.0)))) | 87 0.0)))) |
88 | 88 |
89 (define-public (stem::pure-length grob beg end) | 89 (define-public (stem::pure-length grob beg end) |
90 (let* ((ss (ly:staff-symbol-staff-space grob)) | 90 (let* ((ss (ly:staff-symbol-staff-space grob)) |
91 (beg (ly:grob-pure-property grob 'stem-begin-position 0 1000))) | 91 (beg (ly:grob-pure-property grob 'stem-begin-position 0 2147483646))) |
92 (abs (- (ly:stem::pure-calc-stem-end-position grob 0 2147483646) beg)))) | 92 (abs (- (ly:stem::pure-calc-stem-end-position grob 0 2147483646) beg)))) |
93 | 93 |
94 (define-public (note-head::calc-duration-log grob) | 94 (define-public (note-head::calc-duration-log grob) |
95 (min 2 | 95 (min 2 |
96 (ly:duration-log | 96 (ly:duration-log |
97 (ly:event-property (event-cause grob) 'duration)))) | 97 (ly:event-property (event-cause grob) 'duration)))) |
98 | 98 |
99 (define-public (dots::calc-dot-count grob) | 99 (define-public (dots::calc-dot-count grob) |
100 (ly:duration-dot-count | 100 (ly:duration-dot-count |
101 (ly:event-property (event-cause grob) 'duration))) | 101 (ly:event-property (event-cause grob) 'duration))) |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 (if result | 341 (if result |
342 (vector (string? (car result)) #t (string? (cdr result))) | 342 (vector (string? (car result)) #t (string? (cdr result))) |
343 all-invisible))) | 343 all-invisible))) |
344 | 344 |
345 (define-public (shift-right-at-line-begin g) | 345 (define-public (shift-right-at-line-begin g) |
346 "Shift an item to the right, but only at the start of the line." | 346 "Shift an item to the right, but only at the start of the line." |
347 (if (and (ly:item? g) | 347 (if (and (ly:item? g) |
348 (equal? (ly:item-break-dir g) RIGHT)) | 348 (equal? (ly:item-break-dir g) RIGHT)) |
349 (ly:grob-translate-axis! g 3.5 X))) | 349 (ly:grob-translate-axis! g 3.5 X))) |
350 | 350 |
| 351 (define-public (left-bar-stub::pure-height grob start end) |
| 352 (ly:grob-set-object! grob |
| 353 'elements |
| 354 (ly:grob-object (ly:grob-original grob) 'elements)) |
| 355 ; we use a cond to avoid cheking ly:item-extremal if possible, as it is |
| 356 ; computationally expensive |
| 357 (cond |
| 358 ((eqv? grob (ly:grob-original grob)) |
| 359 '(+inf.0 . -inf.0)) |
| 360 ((ly:item-extremal grob start end) |
| 361 '(+inf.0 . -inf.0)) |
| 362 (else |
| 363 (ly:axis-group-interface::pure-height grob 0 2147483646)))) |
| 364 |
351 (define-public (span-bar-stub::height grob) | 365 (define-public (span-bar-stub::height grob) |
352 (ly:grob-property grob 'elements-filtered) | 366 (ly:grob-property grob 'elements-filtered) |
353 (ly:axis-group-interface::height grob)) | 367 (ly:axis-group-interface::height grob)) |
354 | 368 |
355 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 369 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
356 ;; Tuplets | 370 ;; Tuplets |
357 | 371 |
358 (define-public (tuplet-number::calc-direction grob) | 372 (define-public (tuplet-number::calc-direction grob) |
359 (ly:tuplet-bracket::calc-direction (ly:grob-object grob 'bracket))) | 373 (ly:tuplet-bracket::calc-direction (ly:grob-object grob 'bracket))) |
360 | 374 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 (list))))) | 1006 (list))))) |
993 | 1007 |
994 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1008 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
995 ;; laissez-vibrer tie | 1009 ;; laissez-vibrer tie |
996 ;; | 1010 ;; |
997 ;; needed so we can make laissez-vibrer a pure print | 1011 ;; needed so we can make laissez-vibrer a pure print |
998 ;; | 1012 ;; |
999 (define-public (laissez-vibrer::print grob) | 1013 (define-public (laissez-vibrer::print grob) |
1000 (ly:tie::print grob)) | 1014 (ly:tie::print grob)) |
1001 | 1015 |
OLD | NEW |