- Bar * bold = 0;
- if (o->is_type_b(Bar::static_name() ))
- bold = (Bar*)o->item();
- else
- return;
-
- bold->spanned_i_ --;
- Bar * b =0;
- if (n && n->is_type_b(Bar::static_name() )) {
- b = (Bar*)n->item();
- b->spanned_i_ ++;
+ Grob *me = unsmob_grob (smobbed_me);
+ extract_grob_set (me, "elements", elements);
+ Grob *refp = common_refpoint_of_array (elements, me, Y_AXIS);
+
+ Span_bar::evaluate_glyph (me);
+ SCM glyph = me->get_property ("glyph");
+
+ /* glyph may not be a string, when ME is killed by Hara Kiri in
+ between. */
+ if (!scm_is_string (glyph))
+ return SCM_EOL;
+
+ String glyph_string = ly_scm2string (glyph);
+
+ /* compose span_bar_mol */
+ Array<Interval> extents;
+ Grob *model_bar = 0;
+ for (int i = elements.size (); i--;)
+ {
+ Grob *bar = elements[i];
+ Interval ext = bar->extent (refp, Y_AXIS);
+ if (ext.is_empty ())
+ continue;
+
+ extents.push (ext);
+ model_bar = bar;