;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 2008--2011 Reinhold Kainhofer <reinhold@kainhofer.com>
+;;;; Copyright (C) 2008--2012 Reinhold Kainhofer <reinhold@kainhofer.com>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
(let* ((stem-grob (ly:grob-parent grob X))
(adjust #t)
- (stem-end (inexact->exact (round (ly:grob-property stem-grob 'stem-end-position))))
+ (d (ly:grob-property stem-grob 'direction))
+ (ss (ly:staff-symbol-staff-space stem-grob))
+ (stem-end (inexact->exact (round (* (index-cell
+ (ly:grob-extent stem-grob
+ stem-grob
+ Y)
+ d)
+ (/ 2 ss)))))
; For some reason the stem-end is a real instead of an integer...
(dir-modifier (if (ly:position-on-line? stem-grob stem-end) "1" "0"))
(modifier (if adjust dir-modifier "2")))