19 minnote = 1000; // invalid values
32 Stem::set_stemend(Real se)
36 assert((dir > 0 && se >= maxnote) || (se <= minnote && dir <0));
38 top = (dir < 0) ? maxnote : se;
39 bot = (dir < 0) ? se : minnote;
44 Stem::add(Notehead *n)
57 mtor << "Stem minmax=["<< minnote<<","<<maxnote<<"], flag: "<<flag;
62 Stem::set_default_dir()
64 Real mean = (minnote+maxnote)/2;
65 dir = (mean > staff_center) ? -1: 1;
69 Stem::set_default_stemlen()
74 int stafftop = 2*staff_center;
75 stemlen = STEMLEN + (maxnote - minnote);
77 // uhh... how about non 5-line staffs?
78 if (maxnote < -2 && dir == 1){
79 int t = staff_center - staff_center/2;
80 stemlen = t - minnote +2;
81 } else if (minnote > stafftop + 2 && dir == -1) {
82 int t = staff_center + staff_center/2;
83 stemlen = maxnote -t +2;
91 Stem::set_default_extents()
93 assert(minnote<=maxnote);
96 set_default_stemlen();
98 set_stemend((dir< 0) ? maxnote-stemlen: minnote +stemlen);
100 stem_xoffset = paper()->note_width();
107 set_default_extents();
114 if (!print_flag || ABS(flag) <= 4)
115 return Interval(0,0); // TODO!
117 Interval r(p->lookup_->flag(flag).dim.x);
123 Stem::brew_molecole()
129 Paperdef *p =paper();
131 Real dy = p->internote();
132 Symbol ss =p->lookup_->stem(bot*dy,top*dy);
135 output = new Molecule(Atom(ss));
137 if (print_flag&&ABS(flag) > 4){
138 Symbol fl = p->lookup_->flag(flag);
142 } else if (flag > 4) {
148 output->translate(Offset(stem_xoffset,0));
155 return pcol_->hpos + stem_xoffset;