Reviewers: ,
Message:
Please review.
Description:
Issue 4238: Glissando overlaps dot
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.
Please review this at https://codereview.appspot.com/194920043/
Affected files (+29, -0 lines):
A input/regression/glissando-dots.ly
M lily/line-spanner.cc
M scm/define-grobs.scm
Index: input/regression/glissando-dots.ly
diff --git a/input/regression/glissando-dots.ly
b/input/regression/glissando-dots.ly
new file mode 100644
index
0000000000000000000000000000000000000000..c0c6621231896bf6e605f1816978c79473ffca39
--- /dev/null
+++ b/input/regression/glissando-dots.ly
@@ -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: lily/line-spanner.cc
diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc
index
6921ba058ec8e8d440218b4babf076773be0585a..5184d396a6ce84745599032c0cebdb4db8e86276
100644
--- a/lily/line-spanner.cc
+++ b/lily/line-spanner.cc
@@ -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: scm/define-grobs.scm
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index
e939ac9b5249f66aa5a6b22a712d83300ca80e4d..c859b52bcbeee1d59a9b8af1f758246eab43b940
100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -1067,6 +1067,7 @@
))
(left . ((attach-dir . ,RIGHT)
(padding . 0.5)
+ (start-at-dot . #t)
))
))
(cross-staff . ,ly:line-spanner::calc-cross-staff)
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel