vector_sort (heads, less<Grob*> ());
uniq (heads);
- common[Y_AXIS] = common_refpoint_of_array (heads, common[Y_AXIS], Y_AXIS);
vector<Grob *> stems;
+ for (vsize i = 0; i < heads.size (); i++)
+ {
+ if (Grob *s = Rhythmic_head::get_stem (heads[i]))
+ stems.push_back (s);
+ }
+
+ vector_sort (stems, less<Grob*> ());
+ uniq (stems);
+
+ common[Y_AXIS] = common_refpoint_of_array (heads, common[Y_AXIS], Y_AXIS);
+ common[Y_AXIS] = common_refpoint_of_array (stems, common[Y_AXIS], Y_AXIS);
+
for (vsize i = 0; i < heads.size (); i++)
{
if (Grob *s = Rhythmic_head::get_stem (heads[i]))
ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ());
}
- ape->left_skyline_ = Skyline (ape->extents_, Y_AXIS, LEFT);
- ape->right_skyline_ = Skyline (ape->extents_, Y_AXIS, RIGHT);
+ ape->left_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, LEFT);
+ ape->right_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, RIGHT);
}
Interval total;
stems[i]->pure_height (common[Y_AXIS], 0, very_large)));
}
- head_ape->left_skyline_ = Skyline (head_extents, Y_AXIS, LEFT);
+ head_ape->left_skyline_ = Skyline (head_extents, 0, Y_AXIS, LEFT);
head_ape->offset_ = 0.0;
Real padding = robust_scm2double (me->get_property ("padding"), 0.2);