-MAKE_SCHEME_CALLBACK (Slur, height, 2);
-SCM
-Slur::height (SCM smob, SCM ax)
-{
- Axis a = (Axis)gh_scm2int (ax);
- Grob * me = unsmob_grob (smob);
- assert (a == Y_AXIS);
-
- SCM mol = me->get_uncached_stencil ();
- Interval ext;
- if (Stencil * m = unsmob_stencil (mol))
- ext = m->extent (a);
- return ly_interval2scm (ext);
-}
-
-/*
- Ugh should have dash-length + dash-period
- */
-MAKE_SCHEME_CALLBACK (Slur, print,1);
-SCM
-Slur::print (SCM smob)
-{
- Grob * me = unsmob_grob (smob);
- if (!scm_ilength (me->get_property ("note-columns")))
- {
- me->suicide ();
- return SCM_EOL;
- }
-
- Real base_thick = robust_scm2double (me->get_property ("thickness"), 1);
- Real thick = base_thick * Staff_symbol_referencer::line_thickness (me);
-
- Real ss = Staff_symbol_referencer::staff_space (me);
- Bezier one = get_curve (me);
-
- // get_curve may suicide
- if (!scm_ilength (me->get_property ("note-columns")))
- return SCM_EOL;
-
- Stencil a;
-
- /*
- TODO: replace dashed with generic property.
- */
- SCM d = me->get_property ("dashed");
- if (gh_number_p (d))
- a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
- else
- a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
- thick);
-
- return a.smobbed_copy ();
-}
-