(c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+
+#include "note-column.hh"
+
#include <math.h> // ceil
#include "axis-group-interface.hh"
-#include "note-column.hh"
#include "stem.hh"
#include "warn.hh"
-#include "paper-def.hh"
-#include "group-interface.hh"
+#include "output-def.hh"
#include "staff-symbol-referencer.hh"
#include "rest.hh"
#include "note-head.hh"
SCM s1 = p1->get_property ("horizontal-shift");
SCM s2 = p2->get_property ("horizontal-shift");
- int h1 = (gh_number_p (s1))? gh_scm2int (s1) :0;
- int h2 = (gh_number_p (s2)) ? gh_scm2int (s2):0;
+ int h1 = (scm_is_number (s1))? scm_to_int (s1) :0;
+ int h2 = (scm_is_number (s2)) ? scm_to_int (s2):0;
return h1 - h2;
}
iv.set_empty ();
SCM h = me->get_property ("note-heads");
- for (; gh_pair_p (h); h = ly_cdr (h))
+ for (; scm_is_pair (h); h = scm_cdr (h))
{
- Grob *se = unsmob_grob (ly_car (h));
+ Grob *se = unsmob_grob (scm_car (h));
- int j = (int)rint (Staff_symbol_referencer::get_position (se));
+ int j = Staff_symbol_referencer::get_rounded_position (se);
iv.unite (Slice (j,j));
}
return iv;
Grob *stem = unsmob_grob (me->get_property ("stem"));
if (stem && Stem::has_interface (stem))
return Stem::get_direction (stem);
- else if (gh_pair_p (me->get_property ("note-heads")))
+ else if (scm_is_pair (me->get_property ("note-heads")))
return (Direction)sign (head_positions_interval (me).center ());
programming_error ("Note column without heads and stem!");
bool both = false;
if (Rest::has_interface (h))
{
- if (gh_pair_p (me->get_property ("note-heads")))
+ if (scm_is_pair (me->get_property ("note-heads")))
both = true;
else
me->set_property ("rest", h->self_scm ());
Note_column::translate_rests (Grob*me, int dy)
{
Grob * r = unsmob_grob (me->get_property ("rest"));
- if (r && !gh_number_p (r->get_property ("staff-position")))
+ if (r && !scm_is_number (r->get_property ("staff-position")))
{
r->translate_axis (dy * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
}
{
SCM heads = me->get_property ("note-heads");
Grob * acc = 0;
- for (;gh_pair_p (heads); heads =gh_cdr (heads))
+ for (;scm_is_pair (heads); heads = scm_cdr (heads))
{
- Grob * h = unsmob_grob (gh_car (heads));
+ Grob * h = unsmob_grob (scm_car (heads));
acc = h ? unsmob_grob (h->get_property ("accidental-grob")) : 0;
if (acc)
break;