bool pure, int start, int end,
vector<Skyline_pair> *const ret)
{
- Grob *other_axis_common = common_refpoint_of_array (*elements, me, other_axis (a));
+ /* each child's skyline was calculated according to the common refpoint of its
+ elements. Here we need all the skylines to be positioned with respect to
+ a single refpoint, so we need the common refpoint of the common refpoints
+ of the elements of the children */
+ vector<Grob*> child_refpoints;
+ for (vsize i = 0; i < elements->size (); i++)
+ {
+ extract_grob_set ((*elements)[i], "elements", child_elts);
+ Grob *child_common = common_refpoint_of_array (child_elts, (*elements)[i], other_axis (a));
+ child_refpoints.push_back (child_common);
+ }
+ Grob *common_refpoint = common_refpoint_of_array (child_refpoints, me, other_axis (a));
+
for (vsize i = elements->size (); i--;)
{
Grob *g = (*elements)[i];
Interval extent = g->maybe_pure_extent (g, a, pure, start, end);
Interval other_extent = pure ? Interval (-infinity_f, infinity_f)
- : g->extent (other_axis_common, other_axis (a));
+ : g->extent (common_refpoint, other_axis (a));
Box b = (a == X_AXIS) ? Box (extent, other_extent) : Box (other_extent, extent);
if (extent.is_empty ())
b[a] = ly_scm2interval (min_extent);
skylines.insert (b, 0, other_axis (a));
}
- Real offset = g->relative_coordinate (other_axis_common, other_axis (a));
- skylines.shift (-offset);
+
+ Real offset = child_refpoints[i]->relative_coordinate (common_refpoint, other_axis (a));
+ skylines.shift (offset);
}
else
dy = skylines[j-1][stacking_dir].distance (skylines[j][-stacking_dir]);
- where += stacking_dir * (dy + padding + extra_space / elems.size ());
+ where += stacking_dir * max (0.0, dy + padding + extra_space / elems.size ());
translates.push_back (where);
}
\consists "Figured_bass_position_engraver"
\consists "Script_row_engraver"
- \override VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4)
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.5 . 3.5)
localKeySignature = #'()
createSpacing = ##t
ignoreFiguredBassRest = ##t
\context{
\type "Engraver_group"
- \override VerticalAxisGroup #'minimum-Y-extent = #'(-1.2 . 2.4)
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.75 . 2.0)
\description " Corresponds to a voice with lyrics. Handles the
printing of a single line of lyrics. "
\consists "Hara_kiri_engraver"
% \consists "Note_spacing_engraver"
voltaOnThisStaff = ##f
- \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 2.5)
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 2)
\override SeparatingGroupSpanner #'padding = #0.8
\override VerticalAxisGroup #'remove-first = ##t
\override VerticalAxisGroup #'remove-empty = ##t
\override VerticalAxisGroup #'remove-empty = ##t
\override VerticalAxisGroup #'remove-first = ##t
- \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.5 . 2.5)
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 2)
}
\context {
(positioning-done . ,ly:align-interface::calc-positioning-done)
(Y-extent . ,ly:axis-group-interface::height)
(stacking-dir . -1)
+ (padding . 0.2)
(meta . ((class . Spanner)
(interfaces . (align-interface
bass-figure-alignment-interface
(Y-extent . ,ly:axis-group-interface::height)
(X-extent . ,ly:axis-group-interface::width)
(stacking-dir . -1)
- (padding . 0.1)
+ (padding . 0.5)
(skylines . ,ly:axis-group-interface::combine-skylines)
(meta . ((class . Spanner)
(interfaces . (align-interface