-Tie::get_control_points (SCM smob)
-{
- Spanner*me = unsmob_spanner (smob);
- Direction headdir = CENTER;
- if (head (me,LEFT))
- headdir = LEFT;
- else if (head (me,RIGHT))
- headdir = RIGHT;
- else
- {
- programming_error ("Tie without heads.");
- me->suicide ();
- return SCM_UNSPECIFIED;
- }
-
-
- if (!Directional_element_interface::get (me))
- Directional_element_interface::set (me, Tie::get_default_dir (me));
- Direction dir = Directional_element_interface::get (me);
-
- Real staff_space = Staff_symbol_referencer::staff_space (me);
-
- Real x_gap_f = gh_scm2double (me->get_grob_property ("x-gap"));
-
- Grob* l = me->get_bound (LEFT);
- Grob* r = me->get_bound (RIGHT);
-
- Grob* commonx = me->common_refpoint (l, X_AXIS);
- commonx = me->common_refpoint (r, X_AXIS);
-
- Real left_x;
-
- /*
- the tie has to be long enough to be visible, but should not go
- through key sigs. In the 1.5 series the pref.matter - note
- distance is fixed , so this won't be a problem anymore.
- */
- Real lambda = 0.9;
-
- if (Note_head::has_interface (l))
- {
- Real where = RIGHT;
-
- /*
- This correction is due te the shape of the black note head.
- */
- if (Rhythmic_head::duration_log (l) == 2)
- where += dir* 0.2;
- left_x = l->extent (l, X_AXIS).linear_combination (where)
- + x_gap_f;
- }
- else
- left_x = l->extent (l, X_AXIS).linear_combination (lambda);
-
-
- Real width;
- if (Note_head::has_interface (l) && Note_head::has_interface (r))
+Tie::calc_direction (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Grob *yparent = me->get_parent (Y_AXIS);
+ if (Tie_column::has_interface (yparent)
+ && unsmob_grob_array (yparent->get_object ("ties"))
+ && unsmob_grob_array (yparent->get_object ("ties"))->size () > 1)