- for (Dot_configuration::const_iterator i (cfg.begin ());
- i != cfg.end (); i++)
- {
- int p = i->first;
- if (p == k)
- {
- if (Staff_symbol_referencer::on_line (i->second.dot_, p))
- p += d;
- else
- p += 2* d;
-
- offset = 2*d;
-
- new_cfg[p] = i->second;
- }
- else
- {
- if (new_cfg.find (p) == new_cfg.end ())
- offset = 0;
- new_cfg[p + offset] = i->second;
- }
- }
+ Grob *s = support[i];
+ if (!ss)
+ ss = Staff_symbol_referencer::staff_space (s);
+
+ /* can't inspect Y extent of rest.
+
+ Rest collisions should wait after line breaking.
+ */
+ Interval y;
+ if (Rest::has_interface (s))
+ {
+ base_x.unite (s->extent (commonx, X_AXIS));
+ continue;
+ }
+ else if (Stem::has_interface (s))
+ {
+ Real y1 = Stem::head_positions (s)[-get_grob_direction (s)];
+ Real y2 = y1 + get_grob_direction (s) * 7;
+
+ y.add_point (y1);
+ y.add_point (y2);
+
+ stems.insert (s);
+ }
+ else if (Note_head::has_interface (s))
+ y = Interval (-1.1, 1.1);
+ else
+ {
+ programming_error ("unknown grob in dot col support");
+ continue;
+ }
+
+ y += Staff_symbol_referencer::get_position (s);
+
+ Box b (s->extent (commonx, X_AXIS), y);
+ boxes.push_back (b);
+
+ if (Grob *stem = unsmob_grob (s->get_object ("stem")))
+ stems.insert (stem);