From 40a82c4b4680d4c4fc5b67688e039c90eca8dbcc Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 29 Apr 2013 10:24:46 +0200 Subject: [PATCH] Better shape control of arpeggio brackets. --- lily/arpeggio.cc | 5 +++-- scm/define-grob-properties.scm | 2 ++ scm/define-grobs.scm | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 96b6bbd3d5..fa53ff2611 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -169,7 +169,7 @@ Arpeggio::brew_chord_bracket (SCM smob) Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness")); Real sp = 1.5 * Staff_symbol_referencer::staff_space (me); Real dy = heads.length () + sp; - Real x = 0.7; + Real x = robust_scm2double (me->get_property ("protrusion"), 0.4); Stencil mol (Lookup::bracket (Y_AXIS, Interval (0, dy), lt, x, lt)); mol.translate_axis (heads[LEFT] - sp / 2.0, Y_AXIS); @@ -227,9 +227,10 @@ ADD_INTERFACE (Arpeggio, /* properties */ "arpeggio-direction " + "dash-definition " // TODO: make apply to non-slur arpeggios "positions " + "protrusion " "script-priority " // TODO: make around-note-interface "stems " - "dash-definition " // TODO: make apply to non-slur arpeggios ); diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index b4861729b7..6434c15c46 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -734,6 +734,8 @@ positions are requested, the closest one is taken.") (prefer-dotted-right ,boolean? "For note collisions, prefer to shift dotted up-note to the right, rather than shifting just the dot.") + (protrusion ,number? "In an arpeggio bracket, the length of the +horizontal edges.") ;; ;; r diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 8e94dae778..b89fc14757 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -169,6 +169,7 @@ (direction . ,LEFT) (padding . 0.5) (positions . ,ly:arpeggio::calc-positions) + (protrusion . 0.4) (script-priority . 0) (side-axis . ,X) (staff-position . 0.0) -- 2.39.2