From 0119c1b84108674cf2b1c72bd8c231d831ce1f0f Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Sun, 24 Aug 2014 15:54:45 -0700 Subject: [PATCH] Ottava Bracket bounds; issue 3690 Ottava Bracket: do not dash edges; issue 3866 --- lily/ottava-bracket.cc | 26 +++++++++++++------------- lily/tuplet-bracket.cc | 19 +++++++++---------- scm/define-grobs.scm | 6 +++--- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index 7def9bf96c..7c115de263 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -119,6 +119,8 @@ Ottava_bracket::print (SCM smob) else span_points[d] = ext[d]; + + span_points[d] -= d * shorten[d]; } /* @@ -155,21 +157,19 @@ Ottava_bracket::print (SCM smob) Y_AXIS, Offset (bracket_span_points.length (), 0), edge_height, empty, - flare, shorten); + flare, Drul_array (0, 0)); /* - The vertical lines should not take space, for the following scenario: - - 8 -----+ - o | - | - | - - - Just a small amount, yes. In tight situations, it is even - possible to center the `8' directly below the note, dropping the - ottava line completely... - + * The vertical lines should not take space, for the following scenario: + * + * 8 -----+ + * o | + * | + * | + * + * Just a small amount, yes. In tight situations, it is even + * possible to center the `8' directly below the note, dropping the + * ottava line completely... */ b = Stencil (Box (b.extent (X_AXIS), diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 020f3939f6..3266780a3a 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -438,20 +438,19 @@ Tuplet_bracket::make_bracket (Grob *me, // for line properties. } Stencil m; - for (LEFT_and_RIGHT (d)) - { - if (!gap.is_empty ()) - m.add_stencil (Line_interface::line (me, straight_corners[d], - gap_corners[d])); - + if (!gap.is_empty ()) + for (LEFT_and_RIGHT (d)) m.add_stencil (Line_interface::line (me, straight_corners[d], - flare_corners[d])); - } - - if (gap.is_empty ()) + gap_corners[d])); + else m.add_stencil (Line_interface::line (me, straight_corners[LEFT], straight_corners[RIGHT])); + if (scm_is_number (me->get_property ("dash-fraction"))) + me->set_property ("dash-fraction", scm_from_double (1.0)); + for (LEFT_and_RIGHT (d)) + m.add_stencil (Line_interface::line (me, straight_corners[d], + flare_corners[d])); return m; } diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 4139ff13da..7baaf000cb 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1671,12 +1671,12 @@ . ( (dash-fraction . 0.3) (direction . ,UP) - (edge-height . (0 . 1.2)) + (edge-height . (0 . 0.8)) (font-shape . italic) - (minimum-length . 1.0) + (minimum-length . 0.3) (outside-staff-priority . 400) (padding . 0.5) - (shorten-pair . (0.0 . -0.6)) + (shorten-pair . (-0.8 . -0.6)) (staff-padding . 2.0) (stencil . ,ly:ottava-bracket::print) (style . dashed-line) -- 2.39.5