#include "staff-side.hh"
#include "staff-sym.hh"
+#include "debug.hh"
void
Staff_side::set_staffsym(Staff_symbol* s_l)
{
if (!staff_sym_l_)
return 0;
+ if (!dir_i_) {
+ warning("Staff_side::get_position_i(): returning -20");
+ return -20;
+ }
Real inter_f = staff_sym_l_->inter_note_f();
int staff_size_i = staff_sym_l_->steps_i();
Interval v= support_height();
y = v[dir_i_] + 2*dir_i_*inter_f; // ugh
}
- return int(rint(Real(y)/inter_f));
+ return int(rint(Real(y)/inter_f)); // should ret a float?
+}
+
+int
+Staff_side::get_position_i(Interval sym_dim) const
+{
+ if (!staff_sym_l_)
+ return 0;
+ if (!dir_i_) {
+ warning("Staff_side::get_position_i(): returning -20");
+ return -20;
+ }
+
+ Real inter_f = staff_sym_l_->inter_note_f();
+
+ int i= get_position_i();
+ return i+ int(rint(- sym_dim[dir_i_] / inter_f));
}