*/
+#include "stem-tremolo.hh"
+
+#include "spanner.hh"
#include "beam.hh"
#include "directional-element-interface.hh"
#include "item.hh"
#include "lookup.hh"
#include "output-def.hh"
#include "staff-symbol-referencer.hh"
-#include "stem-tremolo.hh"
#include "stem.hh"
#include "warn.hh"
SCM
Stem_tremolo::height (SCM smob, SCM ax)
{
- Axis a = (Axis)ly_scm2int (ax);
+ Axis a = (Axis)scm_to_int (ax);
Grob *me = unsmob_grob (smob);
assert (a == Y_AXIS);
Stem_tremolo::raw_stencil (Grob *me)
{
Grob *stem = unsmob_grob (me->get_property ("stem"));
- Grob *beam = Stem::get_beam (stem);
-
+ Spanner*beam = Stem::get_beam (stem);
Real dydx;
if (beam)
{
Real dy = 0;
SCM s = beam->get_property ("positions");
if (is_number_pair (s))
- dy = -ly_scm2double (ly_car (s)) +ly_scm2double (ly_cdr (s));
+ dy = -scm_to_double (scm_car (s)) +scm_to_double (scm_cdr (s));
Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
- Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
Real ss = Staff_symbol_referencer::staff_space (me);
Real thick = robust_scm2double (me->get_property ("beam-thickness"),1);
Real width = robust_scm2double (me->get_property ("beam-width"),1);
- Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
width *= ss;
thick *= ss;
int tremolo_flags = 0;
SCM s = me->get_property ("flag-count");
- if (ly_c_number_p (s))
- tremolo_flags = ly_scm2int (s);
+ if (scm_is_number (s))
+ tremolo_flags = scm_to_int (s);
if (!tremolo_flags)
{
return SCM_EOL;
}
- Grob *beam = Stem::get_beam (stem);
+ Spanner *beam = Stem::get_beam (stem);
Direction stemdir = Stem::get_direction (stem);
if (stemdir == 0)
stemdir = UP;
Real beamthickness = 0.0;
SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL ;
- if (ly_c_number_p (sbt))
- beamthickness = ly_scm2double (sbt) * ss;
+ if (scm_is_number (sbt))
+ beamthickness = scm_to_double (sbt) * ss;
Real end_y
= Stem::stem_end_position (stem) * ss / 2