diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-05-16 19:00:39 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-05-16 19:00:39 +0000 |
commit | 0ad4c4c0df570e26cca972402a070a8eead2f46d (patch) | |
tree | 7d3a608d3ef5a1160eb5aa8e43a3a38d429fee66 | |
parent | 882f02a78bacf9ce981f4128ad062eca1c4417b0 (diff) |
*** empty log message ***
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | input/regression/hairpin-to-barline.ly | 18 | ||||
-rw-r--r-- | lily/dynamic-engraver.cc | 14 | ||||
-rw-r--r-- | lily/hairpin.cc | 2 | ||||
-rw-r--r-- | scm/define-context-properties.scm | 2 |
5 files changed, 44 insertions, 3 deletions
@@ -7,6 +7,17 @@ 2006-05-16 Han-Wen Nienhuys <hanwen@lilypond.org> + * lily/dynamic-engraver.cc (typeset_all): hang ending on + currentCommandColumn. + + * lily/hairpin.cc (print): also add padding for non-neighbor + hairpin bounds. + + * scm/define-context-properties.scm + (all-user-translation-properties): add hairpinToBarline + + * input/regression/hairpin-to-barline.ly: new file. + * lily/context.cc (internal_send_stream_event): thinko fix. * lily/tie.cc (set_default_control_points): robustness fix. diff --git a/input/regression/hairpin-to-barline.ly b/input/regression/hairpin-to-barline.ly new file mode 100644 index 0000000000..db0483b705 --- /dev/null +++ b/input/regression/hairpin-to-barline.ly @@ -0,0 +1,18 @@ +\header { + + texidoc = "By setting @code{hairpinToBarline}, hairpins will stop at +the barline preceding the ending note." + +} + +\version "2.9.5" + +\paper { + ragged-right = ##t +} + +\relative c'' { + \set hairpinToBarline = ##t + \override Hairpin #'bound-padding = #1.0 + c4\< c2. c4\! +} diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 3c1a517942..6720e77745 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -326,11 +326,21 @@ Dynamic_engraver::typeset_all () { if (finished_cresc_) { - if (!finished_cresc_->get_bound (RIGHT)) + bool use_bar = to_boolean (get_property ("hairpinToBarline")) + && scm_is_string (get_property ("whichBar")) + && !script_ev_; + + + if (!finished_cresc_->get_bound (RIGHT) + || use_bar) { + Grob *column_bound = unsmob_grob (use_bar + ? get_property ("currentCommandColumn") + : get_property ("currentMusicalColumn")); + finished_cresc_->set_bound (RIGHT, script_ ? script_ - : unsmob_grob (get_property ("currentMusicalColumn"))); + : column_bound); if (finished_line_spanner_) add_bound_item (finished_line_spanner_, diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 09efaf4986..8f0252acd2 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -162,7 +162,7 @@ Hairpin::print (SCM smob) x_points[d] = e.center () - d * padding / 3; } else - x_points[d] = e[d]; + x_points[d] = e[d] - d * padding; } } } diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 4c0a71305b..427c14c2bc 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -238,6 +238,8 @@ for the full staff.") (gridInterval ,ly:moment? "Interval for which to generate @ref{GridPoint}s") + (hairpinToBarline ,boolean? "If set, end a hairpin at the barline before the ending note.") + (harmonicAccidentals ,boolean? "If set, harmonic notes in chords get accidentals.") (highStringOne ,boolean? "Whether the 1st string is the string with |