]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/tablature.scm
Web: Updated Frescobaldi in introduction.itexi
[lilypond.git] / scm / tablature.scm
index c26af257c8df13b1c14161a7314a6c201ffd99a7..2adaaa6ed6cc8c55e5f470e401087ebd8aecaba9 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2009--2011 Marc Hohl <marc@hohlart.de>
+;;;; Copyright (C) 2009--2012 Marc Hohl <marc@hohlart.de>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
 
 ;; if stems are drawn, it is nice to have a double stem for
 ;; (dotted) half notes to distinguish them from quarter notes:
+(define-public (tabvoice::make-double-stem-width-for-half-notes grob)
+  (let ((X-extent (ly:stem::width grob)))
+
+    ;; is the note a (dotted) half note?
+    (if (= 1 (ly:grob-property grob 'duration-log))
+        ;; yes -> return double stem width
+        (cons (car X-extent) (+ 0.5 (* 2 (cdr X-extent))))
+        ;; no -> return simple stem width
+        X-extent)))
+
 (define-public (tabvoice::draw-double-stem-for-half-notes grob)
   (let ((stem (ly:stem::print grob)))