- Molecule*output = new Molecule;
- Real w = width().length();
-
- int dy = right_pos_i_ - left_pos_i_;
-
- Real nw_f = paper()->note_width();
- Real nh_f = paper()->internote();
-
-
- w+= (right_dx_f_ - left_dx_f_) * nw_f ;
- Real round_w = w; // slur lookup rounds the slurwidth .
-
- Symbol sl = paper()->lookup_l()->slur(dy , round_w, dir_i_);
-
- Real error = w-round_w;
-
- Atom a(sl);
- a.translate(Offset((left_dx_f_ + 0.5 )*nw_f + error/2,
- left_pos_i_ * nh_f));
- output->add(a);
- return output;
+ Interval i = Spanner::do_width ();
+ Real dx = i.length();
+ return Interval (0, dx);
+}
+
+Array<Offset>
+Bow::get_controls () const
+{
+ Bezier_bow b (paper ());
+ b.set (get_encompass_offset_arr (), dir_);
+ b.calc ();
+ Array<Offset> controls;
+ controls.set_size (8);
+ for (int i = 0; i < 4; i++)
+ controls[i] = b.control_[i];
+ for (int i = 0; i < 4; i++)
+ controls[i + 4] = b.return_[i];
+ return controls;
+}
+
+Array<Offset>
+Bow::get_encompass_offset_arr () const
+{
+ Offset d (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
+ dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
+ d.x() += width (). length ();
+
+#define RESIZE_ICE
+#ifndef RESIZE_ICE
+ Array<Offset> notes;
+ notes.push (Offset 0, 0));
+ notes.push (d);
+#else
+ Array<Offset> notes (2);
+ notes[0] = Offset (0, 0);
+ notes[1] = Offset (d);
+#endif
+
+ return notes;