Reviewers: ,
Message:
A response to Neil's e-mail concerning stem::length - this is a cleaner
implementation.
Cheers,
MS
Description:
Prunes stem::length down to the bare minimum.
Please review this at http://codereview.appspot.com/5057041/
Affected files:
M scm/output-lib.scm
Index: scm/output-lib.scm
diff --git a/scm/output-lib.scm b/scm/output-lib.scm
index
70e3ba3eeb07885ff46475ec6f20b2a841dd01f8..33a2df36a70afcec5747ebaca2363028786e26a8
100644
--- a/scm/output-lib.scm
+++ b/scm/output-lib.scm
@@ -73,17 +73,16 @@
(ly:event-property (event-cause grob) 'duration)))
(define-public (stem::length grob)
- (let* ((d (ly:grob-property grob 'direction))
- (ss (ly:staff-symbol-staff-space grob))
+ (let* ((ss (ly:staff-symbol-staff-space grob))
(beg (ly:grob-property grob 'stem-begin-position))
(beam (ly:grob-object grob 'beam)))
(if (null? beam)
(abs (- (ly:stem::calc-stem-end-position grob) beg))
- (ly:grob-property grob 'length))))
+ (ly:programming-error
+ "stem::length called but will not be used for beamed stem."))))
(define-public (stem::pure-length grob beg end)
- (let* ((d (ly:grob-property grob 'direction))
- (ss (ly:staff-symbol-staff-space grob))
+ (let* ((ss (ly:staff-symbol-staff-space grob))
(beg (ly:grob-pure-property grob 'stem-begin-position 0 1000)))
(abs (- (ly:stem::pure-calc-stem-end-position grob 0 2147483646)
beg))))
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel