]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh://jneem@git.sv.gnu.org/srv/git/lilypond
authorJoe Neeman <joeneeman@gmail.com>
Sat, 10 May 2008 03:08:57 +0000 (13:08 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 10 May 2008 03:08:57 +0000 (13:08 +1000)
1  2 
lily/align-interface.cc

diff --combined lily/align-interface.cc
index 990d03a0c5d61cad8c50e6a8d7f3c60cb4c1ec02,4bcab804351fe3c129e9c257a6500630f7849274..92c405391dfeb1d00465c629e034fcef8c49365a
@@@ -91,13 -91,37 +91,13 @@@ get_skylines (Grob *me
              bool pure, int start, int end,
              vector<Skyline_pair> *const ret)
  {
 -  /* 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++)
 -    {
 -      Grob *elt = (*elements)[i];
 -      Grob *child_common = unsmob_grob ((a == Y_AXIS)
 -                                      ? elt->get_object ("X-common")
 -                                      : elt->get_object ("Y-common"));
 -      
 -      if (!child_common)
 -      {
 -        extract_grob_set (elt, "elements", child_elts);
 -        child_common = common_refpoint_of_array (child_elts, elt, other_axis (a));
 -      }
 -      
 -      child_refpoints.push_back (child_common);
 -    }
 -
 -  Grob *other_common = common_refpoint_of_array (child_refpoints, me, other_axis (a));
 +  Grob *other_common = common_refpoint_of_array (*elements, me, other_axis (a));
    
    for (vsize i = elements->size (); i--;)
      {
        Grob *g = (*elements)[i];
        Skyline_pair skylines;
  
 -      /* each skyline is calculated relative to (potentially) a different other_axis
 -       coordinate. In order to compare the skylines effectively, we need to shift them
 -       to some absolute reference point */
        if (!pure)
        {
          Skyline_pair *skys = Skyline_pair::unsmob (g->get_property (a == Y_AXIS
                skylines.insert (b, 0, other_axis (a));
            }
  
 -        Real offset = child_refpoints[i]->relative_coordinate (other_common, other_axis (a));
 +        /* This skyline was calculated relative to the grob g. In order to compare it to
 +           skylines belonging to other grobs, we need to shift it so that it is relative
 +           to the common reference. */
 +        Real offset = g->relative_coordinate (other_common, other_axis (a));
          skylines.shift (offset);
        }
        else
@@@ -382,7 -403,7 +382,7 @@@ ADD_INTERFACE (Align_interface
               "Order grobs from top to bottom, left to right, right to left"
               " or bottom to top.  For vertical alignments of staves, the"
               " @code{break-system-details} of the left"
-              " @internalsref{NonMusicalPaperColumn} may be set to tune"
+              " @rinternals{NonMusicalPaperColumn} may be set to tune"
               " vertical spacing.  Set @code{alignment-extra-space} to add"
               " extra space for staves.  Set"
               " @code{fixed-alignment-extra-space} to force staves in"