X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fdot-column.cc;h=8480362f1e8024a7cd337447c4464f2216a4021c;hb=c668a48a83d7cdc70e97cb25069427c59d75c31a;hp=523e2955f46ea0728e304085615653e99304dac2;hpb=e86f6ec25d504aaedd55cd2d062194b6c29802fd;p=lilypond.git diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 523e2955f4..8480362f1e 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -6,14 +6,14 @@ (c) 1997--2004 Han-Wen Nienhuys */ -#include +#include "dot-column.hh" + +#include #include #include #include "dots.hh" -#include "dot-column.hh" #include "rhythmic-head.hh" -#include "group-interface.hh" #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" #include "side-position-interface.hh" @@ -29,7 +29,7 @@ SCM Dot_column::force_shift_callback (SCM element_smob, SCM axis) { Grob *me = unsmob_grob (element_smob); - Axis a = (Axis) gh_scm2int (axis); + Axis a = (Axis) scm_to_int (axis); assert (a == Y_AXIS); me = me->get_parent (X_AXIS); @@ -39,7 +39,7 @@ Dot_column::force_shift_callback (SCM element_smob, SCM axis) do_shifts (me); } - return gh_double2scm (0.0); + return scm_make_real (0.0); } MAKE_SCHEME_CALLBACK (Dot_column,side_position, 2); @@ -47,7 +47,7 @@ SCM Dot_column::side_position (SCM element_smob, SCM axis) { Grob *me = unsmob_grob (element_smob); - Axis a = (Axis) gh_scm2int (axis); + Axis a = (Axis) scm_to_int (axis); assert (a == X_AXIS); Grob * stem = unsmob_grob (me->get_property ("stem")); @@ -80,7 +80,7 @@ struct Dot_position Dot_position () { dot_ = 0; - pos_ =0; + pos_ = 0; dir_ = CENTER; } }; @@ -165,7 +165,7 @@ shift_one (Dot_configuration const &cfg, { if (new_cfg.find (p) == new_cfg.end ()) { - offset =0; + offset = 0; } new_cfg[p + offset] = i->second; } @@ -194,7 +194,7 @@ shift_one (Dot_configuration const &cfg, { if (new_cfg.find (p) == new_cfg.end ()) { - offset =0; + offset = 0; } new_cfg[p + offset] = i->second; @@ -255,11 +255,11 @@ Dot_column::do_shifts (Grob*me) dots.sort (compare_position); for (int i = dots.size (); i--;) - if (!dots[i]->live ()) + if (!dots[i]->is_live ()) dots.del (i); Dot_configuration cfg; - for (int i =0;i < dots.size (); i++) + for (int i = 0;i < dots.size (); i++) { Dot_position dp; dp.dot_ = dots[i]; @@ -272,8 +272,8 @@ Dot_column::do_shifts (Grob*me) dp.extremal_head_ = Stem::first_head (stem) == note; } - int p = (int)rint (Staff_symbol_referencer::get_position (dp.dot_)); - dp.pos_= p; + int p = Staff_symbol_referencer::get_rounded_position (dp.dot_); + dp.pos_ = p; if (dp.extremal_head_) dp.dir_ = to_dir (dp.dot_->get_property ("direction"));