- bool fix_broken_b = false;
- Direction d = LEFT;
- do
- {
- dx_f_drul_[d] = dy_f_drul_[d] = 0;
- if ((note_column_drul[d] == spanned_drul_[d])
- && note_column_drul[d]->head_l_arr_.size ()
- && (note_column_drul[d]->stem_l_))
- {
- Stem* stem_l = note_column_drul[d]->stem_l_;
- /*
- side directly attached to note head;
- no beam getting in the way
- */
- if ((stem_l->extent (Y_AXIS).empty_b ()
- || !((stem_l->dir_ == dir_) && (dir_ != d)))
- && !((dir_ == stem_l->dir_)
- && stem_l->beam_l_ && (stem_l->beams_i_drul_[-d] >= 1)))
- {
- dx_f_drul_[d] = spanned_drul_[d]->extent (X_AXIS).length () / 2;
- dx_f_drul_[d] -= d * x_gap_f;
-
- if (stem_l->dir_ != dir_)
- {
- dy_f_drul_[d] = note_column_drul[d]->extent (Y_AXIS)[dir_];
- }
- else
- {
- dy_f_drul_[d] = stem_l->chord_start_f ()
- + dir_ * internote_f;
- }
- dy_f_drul_[d] += dir_ * y_gap_f;
- }
- /*
- side attached to (visible) stem
- */
- else
- {
- dx_f_drul_[d] = stem_l->hpos_f ()
- - spanned_drul_[d]->relative_coordinate (0, X_AXIS);
- /*
- side attached to beamed stem
- */
- if (stem_l->beam_l_ && (stem_l->beams_i_drul_[-d] >= 1))
- {
- dy_f_drul_[d] = stem_l->extent (Y_AXIS)[dir_];
- dy_f_drul_[d] += dir_ * 2 * y_gap_f;
- }
- /*
- side attached to notehead, with stem getting in the way
- */
- else
- {
- dx_f_drul_[d] -= d * x_gap_f;
-
- dy_f_drul_[d] = stem_l->chord_start_f ()
- + dir_ * internote_f;
- dy_f_drul_[d] += dir_ * y_gap_f;
- }
- }
- }
- /*
- loose end
- */
- else
- {
- dx_f_drul_[d] = get_broken_left_end_align ();
-
- /*
- broken: should get y from other piece, so that slur
- continues up/down trend
-
- for now: be horizontal..
- */
- fix_broken_b = true;
- }
- }
- while (flip (&d) != LEFT);