Mike I begin to suspect that you employ an army of monkeys on keyboards. This code works by accident.
Also, change the comment on ‘collision-seconds.ly’ to reflect the new behavior. http://codereview.appspot.com/5729057/diff/1/lily/include/stem.hh File lily/include/stem.hh (right): http://codereview.appspot.com/5729057/diff/1/lily/include/stem.hh#newcode32 lily/include/stem.hh:32: static vector<Offset> note_head_x_y_positions (Grob *me); Better to return x-positions separately. So far you do not use the Offset as a 2-D position, but rather use only individual x- y-components, and probably we should continue to think of the coordinates separately. Don't combine x and y into an Offset here, because the y position is in half-staff-spaces and the x-position is in staff-spaces. http://codereview.appspot.com/5729057/diff/1/lily/note-collision.cc File lily/note-collision.cc (right): http://codereview.appspot.com/5729057/diff/1/lily/note-collision.cc#newcode135 lily/note-collision.cc:135: if (ups[i][X_AXIS] != min_ups) if (ups_X[i] != 0.0); It just happens that min_ups and min_downs always end up being 0.0, which is what you really wanted anyway. Probably better would be an array telling which heads are on the unusual side: if (ups_is_suspended[i]) http://codereview.appspot.com/5729057/diff/1/lily/note-collision.cc#newcode140 lily/note-collision.cc:140: if (dps[j][X_AXIS] != min_downs) if (dps_X[i] != 0.0); http://codereview.appspot.com/5729057/diff/1/lily/stem.cc File lily/stem.cc (right): http://codereview.appspot.com/5729057/diff/1/lily/stem.cc#newcode264 lily/stem.cc:264: /* The positions, in ascending order. */ I see you need the y-component so you can sort these x-components properly, but it complicates things to make a 2D offset. Maybe return two separate arrays: the integer staff-positions and boolean flags marking the heads that are on the unusual side of stem. http://codereview.appspot.com/5729057/ _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
