2005-04-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/slur-scoring.cc (get_bound_info): robustness: substitute
+ relative_coordinate if extent is empty.
+
+ * lily/stem.cc (width_callback): determine correct extent if flag
+ is not there. This fixes slur-no-flag.ly
+
* lily/grace-engraver.cc (consider_change_grace_settings): new function.
(initialize): also consider_change_grace_settings() on
initialization. Fixes large grace notes at start of score.
extremes[d].note_column_ = extremes[d].bound_;
extremes[d].stem_ = Note_column::get_stem (extremes[d].note_column_);
extremes[d].stem_dir_ = get_grob_direction (extremes[d].stem_);
- extremes[d].stem_extent_[X_AXIS]
- = extremes[d].stem_->extent (common_[X_AXIS], X_AXIS);
+
+ for (int a = X_AXIS; a < NO_AXES; a++)
+ {
+ Axis ax = Axis (a);
+ Interval s = extremes[d].stem_->extent (common_[ax], ax);
+ if (s.is_empty ())
+ {
+ programming_error ("Stem has no extent in Slur_score_state");
+ s = Interval (0,0)
+ + extremes[d].stem_->relative_coordinate (common_[ax], ax);
+ }
+ extremes[d].stem_extent_[ax] = s;
+ }
+
extremes[d].stem_extent_[Y_AXIS]
= extremes[d].stem_->extent (common_[Y_AXIS], Y_AXIS);
extremes[d].slur_head_
}
else
{
- r = flag (me).extent (X_AXIS)
- + thickness (me) / 2;
+ r = Interval (-1,1) * thickness (me) * 0.5;
+ r.unite (flag (me).extent (X_AXIS));
}
return ly_interval2scm (r);
}