}
bool parity= true;
- int lastpos = int (Staff_symbol_referencer::get_position (heads[0]));
+ Real lastpos = Real (Staff_symbol_referencer::get_position (heads[0]));
for (int i=1; i < heads.size (); i ++)
{
Real p = Staff_symbol_referencer::get_position (heads[i]);
- int dy =abs (lastpos- (int)p);
+ Real dy =fabs (lastpos- p);
- if (dy <= 1)
+ /*
+ dy should always be 0.5, 0.0, 1.0, but provide safety margin
+ for rounding errors.
+ */
+ if (dy < 1.1)
{
if (parity)
{
Real staff_space = Staff_symbol_referencer::staff_space (me);
Grob *beam = get_beam (me);
Real beam_translation = Beam::get_beam_translation (beam);
- Real beam_thickness = robust_scm2double (beam->get_grob_property ("thickness"), 1);
+ Real beam_thickness = Beam::get_thickness (beam);
int beam_count = Beam::get_direction_beam_count (beam, my_dir);
Real note_start =
/* staff positions */
head_positions (me)[my_dir] * 0.5
- * my_dir;
+ * my_dir * staff_space;
Real ideal_y = note_start + ideal_length;
"no-stem-extend stroke-style");
+
+/****************************************************************/
+
+Stem_info::Stem_info()
+{
+ ideal_y_ = shortest_y_ =0;
+ dir_ = CENTER;
+}
+
+void
+Stem_info::scale (Real x)
+{
+ ideal_y_ *= x;
+ shortest_y_ *= x;
+}