Comment #7 on issue 1056 by n.puttock: Pure-height of stems does not accurately estimate height
http://code.google.com/p/lilypond/issues/detail?id=1056

The 'transparent property doesn't change the extent; try the following file if you
don't believe me. :)

\relative c' {
  \voiceTwo
  \override Stem #'after-line-breaking =
  #(lambda (grob)
     (ly:message "Height: ~S Pure height: ~S"
                 (ly:stem::height grob)
                 (ly:stem::pure-height grob 0 0)))
  a4
  \override Stem #'transparent = ##t
  a4
}

The only difference is that the stencil expression in the transparent case is an
empty list; the extent remains the same.

In you invisible.ly snippet, you've also overriden 'length; that's what's responsible
for the discrepancy between height/pure-height.  If you look at the code in
Stem::pure_height (), it calls calc_length () directly, which bypasses the callback for 'length if it's set to a number. An improvement would be to check the property data first: if it's a number, then the user has explicitly set 'length; otherwise
it's safe to call calc_length ().

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to