lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sets TabVoice Stem height to ##f (issue 6303065)


From: mtsolo
Subject: Sets TabVoice Stem height to ##f (issue 6303065)
Date: Sun, 10 Jun 2012 18:22:50 +0000

Reviewers: ,

Message:
Another way of going about this would be changing the Stem::height
function so that it returned an empty interval for stencil-less stems.
Then the overrides wouldn't be necessary.  It's a design question more
than anything else.

Description:
Sets TabVoice Stem height to ##f

Please review this at http://codereview.appspot.com/6303065/

Affected files:
  M lily/grob.cc
  M ly/engraver-init.ly
  M ly/property-init.ly


Index: lily/grob.cc
diff --git a/lily/grob.cc b/lily/grob.cc
index cc39c979f0e9cf146b40975b01f82ed9441d08bc..828ae7f07b40687457f8031475f0a42d9992dc67 100644
--- a/lily/grob.cc
+++ b/lily/grob.cc
@@ -466,7 +466,10 @@ Grob::extent (Grob *refp, Axis a) const
       ((Grob *)this)->dim_cache_[a].extent_ = new Interval (real_ext);
     }

-  real_ext.translate (offset);
+  // We never want nan, so we avoid shifting infinite values.
+  for (LEFT_and_RIGHT (d))
+    if (!isinf (real_ext[d]))
+      real_ext[d] += offset;

   return real_ext;
 }
Index: ly/engraver-init.ly
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index 9bb731883cba5d9754fdc7c2030508b49bde06f4..2c28af1f23f0472b34887bed7e3cbf3fa577d330 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -825,6 +825,9 @@ context."
   %% after all, the stubs of the stems may still be visible, so ...
   \override Stem #'stencil = ##f
   \override Flag #'stencil = ##f
+  %% and they certainly don't have heights...
+  \override Stem #'Y-extent = ##f
+  \override Flag #'Y-extent = ##f
   %% automatic beams should be suppressed for similar reasons ...
   autoBeaming = ##f
   %% remove beams, dots and rests ...
Index: ly/property-init.ly
diff --git a/ly/property-init.ly b/ly/property-init.ly
index c0b352254ad0f195cb20d99465180ca5c706440a..edd117518a458c76460a277b48982c24cd048f2d 100644
--- a/ly/property-init.ly
+++ b/ly/property-init.ly
@@ -451,6 +451,8 @@ tabFullNotation = {
   \revert TabVoice.Stem #'details
   \revert TabVoice.Stem #'stencil
   \revert TabVoice.Flag #'stencil
+  \revert TabVoice.Stem #'Y-extent
+  \revert TabVoice.Flag #'Y-extent
\override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes \override TabVoice.Stem #'X-extent = #tabvoice::make-double-stem-width-for-half-notes
   \set TabVoice.autoBeaming = ##t





reply via email to

[Prev in Thread] Current Thread [Next in Thread]