11 Script::set_stem(Stem*st_l)
14 dependencies.push(st_l);
18 Script::set_support(Item*i)
24 Script::Script(Script_req* rq, int staflen)
27 specs_l_ = rq->scriptdef;
37 if (specs_l_->invertsym)
38 symdir = (dir < 0) ? -1:1;
42 Script::set_default_dir()
44 if (specs_l_->stemdir) {
48 dir = stem_l_->dir * specs_l_->stemdir;
53 Script::support_height() const return r;
55 for (int i=0; i < support.size(); i++)
56 r.unite(support[i]->height());
60 Script::set_default_pos()
62 Real inter_f= paper()->internote();
63 Interval dy = symbol().dim.y;
65 int d = specs_l_->staffdir;
68 Interval v= support_height();
69 y = v[dir] -dy[-dir] + 2*dir*inter_f;
71 Real y = (d > 0) ? staffsize + 2: -2; // ug
73 Interval v= support_height();
82 Interval v= stem_l_->height();
84 if (d > 0 || (!d && dir > 0)) {
86 }else if (d < 0 || (!d && dir < 0)) {
91 pos = int(rint(Real(y)/inter_f));
97 return symbol().dim.x;
101 Script::symbol()const
103 String preidx_str = (symdir < 0) ?"-" :"";
104 return paper()->lookup_p_->script(preidx_str + specs_l_->symidx);
108 Script::do_pre_processing()
115 Script::do_post_processing()
121 Script::brew_molecule_p() const
123 Real dy = paper()->internote();
125 Molecule*out = new Molecule(Atom(symbol()));
126 out->translate(Offset(0,dy * pos));