X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmulti-measure-rest.cc;h=38dd598ee95d329be323342eeddb4da4817b946b;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=056989a60ed26477b20c816d9b4932ea6932997f;hpb=59a6d1a06432fc0ca88c3023c646182f389ec1b5;p=lilypond.git diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 056989a60e..38dd598ee9 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -80,7 +80,7 @@ Multi_measure_rest::percent (SCM smob) we gotta stay clear of sp_iv, so move a bit to the right if needed. */ - x_off += std::max (sp_iv[LEFT] - rx, 0.0); + x_off += max (sp_iv[LEFT] - rx, 0.0); /* center between stuff. @@ -107,7 +107,7 @@ Multi_measure_rest::print (SCM smob) we gotta stay clear of sp_iv, so move a bit to the right if needed. */ - Real x_off = std::max (sp_iv[LEFT] - rx, 0.0); + Real x_off = max (sp_iv[LEFT] - rx, 0.0); Stencil mol; mol.add_stencil (symbol_stencil (me, space)); @@ -251,9 +251,9 @@ Multi_measure_rest::big_rest (Grob *me, Real width) Real slt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness")); Real y = slt * thick_thick / 2 * ss; Real ythick = hair_thick * slt * ss; - Box b (Interval (0.0, std::max (0.0, (width - 2 * ythick))), Interval (-y, y)); + Box b (Interval (0.0, max (0.0, (width - 2 * ythick))), Interval (-y, y)); - Real blot = width ? (.8 * std::min (y, ythick)) : 0.0; + Real blot = width ? (.8 * min (y, ythick)) : 0.0; Stencil m = Lookup::round_filled_box (b, blot); Stencil yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5) * ythick, Interval (-ss, ss)), blot); @@ -317,19 +317,30 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_cou symbol_count++; } - /* Make outer padding this much bigger. */ + /* + When symbols spread to fullest extent, outer padding is this much + bigger. + */ Real outer_padding_factor = 1.5; + /* Widest gap between symbols; to be limited by max-symbol-separation */ Real inner_padding = (space - symbols_width) / (2 * outer_padding_factor + (symbol_count - 1)); if (inner_padding < 0) inner_padding = 1.0; + Real max_separation = max (robust_scm2double (me->get_property ("max-symbol-separation"), 8.0), + 1.0); + + inner_padding = min (inner_padding, max_separation); + Real left_offset = (space - symbols_width - (inner_padding * (symbol_count - 1))) + / 2; + Stencil mol; for (SCM s = mols; scm_is_pair (s); s = scm_cdr (s)) mol.add_at_edge (X_AXIS, LEFT, *unsmob (scm_car (s)), inner_padding); mol.align_to (X_AXIS, LEFT); - mol.translate_axis (outer_padding_factor * inner_padding, X_AXIS); + mol.translate_axis (left_offset, X_AXIS); return mol; } @@ -392,7 +403,7 @@ Multi_measure_rest::calculate_spacing_rods (Grob *me, Real length) rod.item_drul_[LEFT] = li; rod.item_drul_[RIGHT] = ri; - rod.distance_ = std::max (Paper_column::minimum_distance (li, ri) + length, + rod.distance_ = max (Paper_column::minimum_distance (li, ri) + length, minlen); rod.add_to_cols (); } @@ -432,6 +443,7 @@ ADD_INTERFACE (Multi_measure_rest, "bound-padding " "expand-limit " "hair-thickness " + "max-symbol-separation " "measure-count " "minimum-length " "round-up-exceptions "