Require delta-time before breaking out of separation item loop.
Add time_spanned_interval(Item*, Item*)
--- /dev/null
+\header{
+
+ texidoc = "Skyline horizontal spacing may fold non-adjacent columns
+together, but they still do not collide. In this case, the arpeggio
+and the barline do not collide."
+
+}
+
+\version "2.11.13"
+
+\paper
+{
+ ragged-right = ##t
+}
+
+\new Staff
+\relative c
+{
+ \override Score.NonMusicalPaperColumn #'stencil = #ly:paper-column::print
+ \time 6/8
+ \clef bass
+ s2. |
+ \relative c <<
+ {
+ <des ges b des>4\arpeggio
+ }
+ \\
+ {
+ \acciaccatura ges,8 \voiceTwo ges4
+ }
+ >>
+}
virtual void derived_mark () const;
};
+Interval_t<Moment> spanned_time_interval (Item *l, Item *r);
+
#endif
#include "system.hh"
#include "pointer-group-interface.hh"
+#include "moment.hh"
+
+
Grob *
Item::clone () const
{
return Interval_t<int> (c, c);
}
+Interval_t<Moment>
+spanned_time_interval (Item *l, Item *r)
+{
+ Drul_array<Item*> bounds (l, r);
+ Interval_t<Moment> iv;
+
+ Direction d = LEFT;
+ do
+ {
+ if (bounds[d] && bounds[d]->get_column ())
+ iv[d] = robust_scm2moment (bounds[d]->get_column ()->get_property ("when"),
+ iv[d]);
+ }
+ while (flip (&d) != LEFT);
+
+ do
+ {
+ if (!bounds[d] || !bounds[d]->get_column ())
+ iv[d] = iv[-d];
+ }
+ while (flip (&d) != LEFT);
+
+
+ return iv;
+}
+
+
void
Item::derived_mark () const
{
#include "output-def.hh"
#include "dimensions.hh"
#include "pointer-group-interface.hh"
+#include "moment.hh"
void
Separating_group_spanner::find_rods (Item *r,
Separation_item::set_distance (Drul_array<Item*> (lb, r), padding);
}
- if (Separation_item::set_distance (Drul_array<Item *> (l, r), padding))
+ if (Separation_item::set_distance (Drul_array<Item *> (l, r), padding)
+ /*
+ This check is because grace notes are set very tight, and
+ the accidentals of main note may stick out so far to cover
+ a barline preceding the grace note.
+ */
+ && spanned_time_interval (l, r).length ().main_part_ > Rational (0))
break;
/*
Interval_t<Moment>
Spanner::spanned_time () const
{
- Interval_t<Moment> iv;
-
- Direction d = LEFT;
- do
- {
- if (spanned_drul_[d] && spanned_drul_[d]->get_column ())
- iv[d] = robust_scm2moment (spanned_drul_[d]->get_column ()->get_property ("when"),
- iv[d]);
- }
- while (flip (&d) != LEFT);
-
- do
- {
- if (!spanned_drul_[d] || !spanned_drul_[d]->get_column ())
- iv[d] = iv[-d];
- }
- while (flip (&d) != LEFT);
-
-
- return iv;
+ return spanned_time_interval (spanned_drul_[LEFT],
+ spanned_drul_[RIGHT]);
}
+
Item *
Spanner::get_bound (Direction d) const
{