]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4238: Glissando overlaps dot
authorDavid Nalesnik <david.nalesnik@gmail.com>
Tue, 6 Jan 2015 22:54:39 +0000 (16:54 -0600)
committerDavid Nalesnik <david.nalesnik@gmail.com>
Wed, 14 Jan 2015 20:10:49 +0000 (14:10 -0600)
Glissandi will now begin after augmentation dots by default.  This
behavior may be changed by overriding a new subproperty named
'start-at-dot, set by default to #t.

input/regression/glissando-dots.ly [new file with mode: 0644]
lily/line-spanner.cc
scm/define-grobs.scm

diff --git a/input/regression/glissando-dots.ly b/input/regression/glissando-dots.ly
new file mode 100644 (file)
index 0000000..c0c6621
--- /dev/null
@@ -0,0 +1,24 @@
+\version "2.19.16"
+
+\header {
+  texidoc = "Glissandi begin after dots by default.  This behavior may
+be changed by overriding the @code{start-at-dot} property.
+"
+}
+
+\layout {
+  indent = 0
+  ragged-right = ##t
+}
+
+\relative c'' {
+  c2.\glissando b4
+  c2..\glissando b8
+  c2...\glissando b16
+  \bar "||"
+  <c e g>2. -\tweak style #'trill \glissando <g b d>4
+  \bar "||"
+  c2...\glissando g''16
+  \override Glissando.bound-details.left.start-at-dot = ##f
+  c,,2...\glissando g''16
+}
index 6921ba058ec8e8d440218b4babf076773be0585a..5184d396a6ce84745599032c0cebdb4db8e86276 100644 (file)
@@ -118,6 +118,10 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
       if (acc && to_boolean (ly_assoc_get (ly_symbol2scm ("end-on-accidental"), details, SCM_BOOL_F)))
         x_coord = robust_relative_extent (acc, commonx, X_AXIS).linear_combination (attach);
 
+      Grob *dot = Grob::unsmob (bound_grob->get_object ("dot"));
+      if (dot && to_boolean (ly_assoc_get (ly_symbol2scm ("start-at-dot"), details, SCM_BOOL_F)))
+        x_coord = robust_relative_extent (dot, commonx, X_AXIS).linear_combination (attach);
+
       details = scm_acons (ly_symbol2scm ("X"),
                            scm_from_double (x_coord),
                            details);
index e939ac9b5249f66aa5a6b22a712d83300ca80e4d..c859b52bcbeee1d59a9b8af1f758246eab43b940 100644 (file)
                                     ))
                           (left . ((attach-dir .  ,RIGHT)
                                    (padding . 0.5)
+                                   (start-at-dot . #t)
                                    ))
                           ))
         (cross-staff . ,ly:line-spanner::calc-cross-staff)