8 Script::Script(Script_req* rq, Item*i , int staflen, Stem*st_l)
10 dependencies.add(st_l);
14 specs_l_ = rq->scriptdef;
25 if (specs_l_->invertsym)
26 symdir = (dir < 0) ? -1:1;
30 Script::set_default_dir()
32 if (specs_l_->stemdir) {
36 dir = stem_l_->dir * specs_l_->stemdir;
41 Script::set_default_pos()
43 Real inter_f= paper()->internote();
44 Interval dy = symbol().dim.y;
46 int d = specs_l_->staffdir;
49 Interval v= support->height();
50 y = v[dir] -dy[-dir] + 2*dir*inter_f;
52 Real y = (d > 0) ? staffsize + 2: -2; // ug
54 Interval v= support->height();
63 Interval v= stem_l_->height();
65 if (d > 0 || (!d && dir > 0)) {
67 }else if (d < 0 || (!d && dir < 0)) {
72 pos = int(rint(Real(y)/inter_f));
78 return symbol().dim.x;
84 String preidx_str = (symdir < 0) ?"-" :"";
85 return paper()->lookup_p_->script(preidx_str + specs_l_->symidx);
89 Script::do_pre_processing()
96 Script::do_post_processing()
102 Script::brew_molecule_p() const
104 Real dy = paper()->internote();
106 Molecule*out = new Molecule(Atom(symbol()));
107 out->translate(Offset(0,dy * pos));