2 stem-info.cc -- implement Stem_info
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
16 #include "paper-def.hh"
18 #include "stem-info.hh"
20 Stem_info::Stem_info ()
24 Stem_info::Stem_info (Stem
const *s
)
28 beams_i_
= 0 >? (abs (s
->flag_i_
) - 2);
36 miny_f_ = interline + #beams * interbeam
37 ideal8 = 2 * interline + interbeam
38 ideal16,32,64,128 = 1.5 * interline + #beams * interbeam
41 miny_f_ = interline + #beams * interbeam
42 ideal8,16 = 2 interline + #beams * interbeam
43 ideal32,64,128 = 1.5 interline + #beams * interbeam
47 Real notehead_y
= s
->paper()->interline_f ();
48 // huh? why do i need the / 2
49 // Real interbeam_f = s->paper()->interbeam_f ();
50 Real interbeam_f
= s
->paper()->interbeam_f () / 2;
53 idealy_f_ = dir_ * s->stem_start_f() + beams_i_ * interbeam_f;
55 idealy_f_ += 2 * interline_f;
57 idealy_f_ += 1.5 * interline_f;
60 idealy_f_
= dir_
* s
->stem_end_f();
62 miny_f_
= dir_
* s
->stem_start_f() + notehead_y
+ beams_i_
* interbeam_f
;
64 idealy_f_
= miny_f_
>? idealy_f_
;
65 // assert (miny_f_ <= idealy_f_);