source file of the GNU LilyPond music typesetter
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
*/
#include "interval.hh"
y_=0;
sym_int_ = Interval (0,0);
dir_ = CENTER;
- inside_staff_b_ = false;
}
}
Real
-Staff_side::get_position_f() const
+Staff_side::get_position_f () const
{
if (!dir_)
{
- warning (_("Staff_side::get_position_i(): "
+ warning (_("Staff_side::get_position_f(): "
"somebody forgot to set my vertical direction, returning -20"));
return -20;
}
- Real y=0;
+ Real y = 0;
Real inter_f = paper()-> internote_f ();
- Interval v= support_height();
-// y = v[dir_] + 2*dir_*inter_f; // ugh
- y = v[dir_]; // ugh
+ Interval v = support_height();
+
+ // ugh, dim[y] = PT over here
+ y = v[dir_] + 1 * dir_ * inter_f;
+
+ int y_i = (int)rint (y / inter_f);
+ // ugh: 5 -> staff_lines
+ if (abs (y_i) < 5)
+ {
+ if (!(abs (y_i) % 2))
+ y += (Real)dir_ * inter_f;
+ }
+// else
+// y = v[dir_] + 1 * dir_ * inter_f;
return y;
}