From f9b2c59dd878330905eef9d6c1c7b3729b44aba7 Mon Sep 17 00:00:00 2001 From: Mats Bengtsson Date: Mon, 16 May 2005 11:46:54 +0000 Subject: [PATCH] * lily/horizontal-bracket.cc (print): Take care of the direction property so brackets above the stave point downwards. * scm/define-grobs.scm (all-grob-descriptions): Set staff-padding for HorizontalBracket so it doesn't end up within the stave. --- ChangeLog | 8 ++++++++ lily/horizontal-bracket.cc | 4 ++++ scm/define-grobs.scm | 1 + 3 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index f506874bb6..b1eeae4995 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-05-16 Mats Bengtsson + + * lily/horizontal-bracket.cc (print): Take care of the direction + property so brackets above the stave point downwards. + + * scm/define-grobs.scm (all-grob-descriptions): Set staff-padding + for HorizontalBracket so it doesn't end up within the stave. + 2005-05-16 Jan Nieuwenhuizen * lily/GNUmakefile (default): Typo. diff --git a/lily/horizontal-bracket.cc b/lily/horizontal-bracket.cc index 654a1e0015..c4b598761a 100644 --- a/lily/horizontal-bracket.cc +++ b/lily/horizontal-bracket.cc @@ -57,6 +57,10 @@ Horizontal_bracket::print (SCM smob) Drul_array shorten = robust_scm2interval (me->get_property ("shorten-pair"), Interval (0, 0)); + // Make sure that it points in the correct direction: + Real dir = get_grob_direction (me); + scale_drul (&edge_height, -dir); + Interval empty; Stencil b = Tuplet_bracket::make_bracket (me, Y_AXIS, Offset (ext.length (), 0), diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 04818dcd15..2ba4eabd7f 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -537,6 +537,7 @@ (print-function . ,Horizontal_bracket::print) (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (padding . 0.2) + (staff-padding . 0.2) (direction . -1) (bracket-flare . (0.5 . 0.5)) (meta . ((interfaces . (horizontal-bracket-interface -- 2.39.5