me->set_grob_property ("heads", gh_cons (SCM_EOL, SCM_EOL));
}
-bool
-Tie::has_interface (Grob*me)
-{
- return me->has_interface (ly_symbol2scm ("tie-interface"));
-}
Grob*
Tie::head (Grob*me, Direction d)
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 left_x;
/*
- this is a kludge: the tie has to be long enough to be
- visible, but should not go through key sigs.
-
- (please fixme)
+ 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.5;
+ Real lambda = 0.9;
if (Note_head::has_interface (l))
- left_x = l->extent (l, X_AXIS)[RIGHT] + x_gap_f;
+ {
+ 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);
- 2 * x_gap_f;
}
- Direction dir = Directional_element_interface::get (me);
+
SCM details = me->get_grob_property ("details");
{
Real y1 = ry + clear;
Real y2 = ry - clear;
+
+ /*
+ ugh, we shove the 0.5 out of our sleeves.
+
+ Any way. This test is to make sure that staffline
+ collision avoidance does not result in completely flat
+ ties.
+ */
+ if (fabs (y1 - ypos) < 0.5)
+ y1 = y2;
+ else if (fabs (y2 - ypos) < 0.5)
+ y2 = y1;
newy = (fabs (y1 - y) < fabs (y2 - y)) ? y1 : y2;
Real thick =
gh_scm2double (me->get_grob_property ("thickness"))
- * me->paper_l ()->get_var ("stafflinethickness");
+ * me->paper_l ()->get_var ("linethickness");
Bezier b;
int i = 0;