Reviewers: , Message: My summer of lily continues with this patch. Currently, the pure height function in stem tremolo leads to incorrect results, as without an offset, it places every stem tremolo at the center of the staff for all pure calculations. This patch provides a conservative estimate for the tremolo's offset and height in pure functions (with an exact estimate when beam's are not involved).
If you want to see the pure height approximations in action, use: \override StemTremolo #'stencil = #(lambda (grob) (let ((y-ext (ly:stem-tremolo::pure-height grob 0 0)) (p-y-off (ly:stem-tremolo::pure-calc-y-offset grob 0 0)) (y-off (ly:stem-tremolo::calc-y-offset grob))) (ly:stencil-add (ly:stem-tremolo::print grob) (stencil-with-color (ly:stencil-translate-axis (make-line-stencil 0.2 0 (car y-ext) 0 (cdr y-ext)) (- p-y-off y-off) Y) red)))) Note that overriding the stencil like this wipes out the effect of the pure functions (as the pure height function is chained to the print function), but it will show how the estimates are made (try it in input/regression/stem-tremolo.ly). Passes regtests. Cheers, MS Description: Uses Y-offset for stem tremolos instead of translated stencil. Please review this at http://codereview.appspot.com/4867043/ Affected files: M lily/beam.cc M lily/include/beam.hh M lily/include/stem-tremolo.hh M lily/include/stem.hh M lily/stem-tremolo.cc M lily/stem.cc M scm/define-grobs.scm _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel