Jan Nieuwenhuizen <janneke@gnu.org>
TODO: This is way too hairy
+
+ TODO: fix naming.
+
+ Stem-end, chord-start, etc. is all confusing naming.
*/
#include <math.h> // rint
Real
-Stem::chord_start_f (Grob*me)
+Stem::chord_start_y (Grob*me)
{
return head_positions (me)[get_direction (me)]
* Staff_symbol_referencer::staff_space (me)/2.0;
me->set_grob_property ("stem-end-position", gh_double2scm (se));
}
-int
-Stem::type_i (Grob*me)
-{
- return first_head (me) ? Note_head::balltype_i (first_head (me)) : 2;
-}
/*
Note head that determines hshift for upstems
Real shorten_f = a[ ((duration_log (me) - 2) >? 0) <? (a.size () - 1)] * 2;
/* On boundary: shorten only half */
- if (abs (chord_start_f (me)) == 0.5)
+ if (abs (chord_start_y (me)) == 0.5)
shorten_f *= 0.5;
/* URGURGURG
/* stems in unnatural (forced) direction should be shortened,
according to [Roush & Gourlay] */
- if (chord_start_f (me)
+ if (chord_start_y (me)
&& (get_direction (me) != get_default_dir (me)))
length_f -= shorten_f;
Real thick = gh_scm2double (beam->get_grob_property ("thickness"));
Stem_info info;
- info.ideal_y = chord_start_f (me);
+ info.ideal_y = chord_start_y (me);
// for simplicity, we calculate as if dir == UP