]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.55
authorfred <fred>
Sun, 24 Mar 2002 20:09:29 +0000 (20:09 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:09:29 +0000 (20:09 +0000)
lily/script.cc
lily/staff-side.cc

index 4e57c3ddf5297f4df21dc9db07622e051edc4b35..491e6d655fc8fa43af20734dbef021eec18e57d9 100644 (file)
@@ -99,7 +99,9 @@ Script::brew_molecule_p() const
   Real dx = paper()->note_width()/2;
 
   Molecule*out = new Molecule (specs_l_->get_atom (paper(), dir_));
-  out->translate_axis (y_, Y_AXIS);
+  // ugh, staccato dots are not centred between stafflines (how?)?
+  Real correct = - (Real)dir_ * 2.0 * paper ()->rule_thickness ();
+  out->translate_axis (y_ + correct, Y_AXIS);
   out->translate_axis (dx, X_AXIS);    // FIXME! ugh
   return out;
 }
index b380e1feb8c57e5dbda8e053118ad1fb951b2eab..0e8b9c7cdeaead7b237cba0d7a5200e1b646a6e2 100644 (file)
@@ -63,11 +63,18 @@ Staff_side::get_position_f () const
     }
 
 
-  Real y=0;
+  Real y = 0;
   Real inter_f = paper()-> internote_f ();
 
-  Interval v= support_height();
-  y = v[dir_] + 1 * dir_ * inter_f;    // 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) && !(abs (y_i) % 2))
+    y += (Real)dir_ * inter_f;
 
   return y;
 }