- int idx = int(rint(wid / 6 PT));
- if(!idx) idx ++;
- wid = idx*6 PT;
- String idxstr = (decresc)? "decrescendosym" : "crescendosym";
- Symbol ret=(*symtables_)("param")->lookup(idxstr);
-
- Array<String> a;
- a.push(idx);
- ret.tex = substitute_args(ret.tex, a);
- ret.dim.x = Interval(0,wid);
- return ret;
+ bool embedded_b = postscript_global_b;
+ String embed;
+ Atom ret;
+ if (embedded_b)
+ {
+ Real height = paper_l_->get_var ("barsize") / 6;
+ embed = "\\embeddedps{\n" ;
+ embed += String (wid) + " "
+ + String (height) + " "
+ + String (continued ? height/2 : 0) +
+ + " draw_" + String(decresc ? "de" : "") + "cresc}\n";
+ ret.tex_ = embed;
+ }
+ else
+ {
+ if (wid > 32 * 6 PT)
+ {
+ warning (_("Crescendo too long (") + print_dimen (wid)
+ +_( ") shrinking (ugh)"));
+ wid = 32*6 PT;
+ }
+ int idx = int (rint (wid / 6 PT));
+ if (!idx) idx ++;
+ wid = idx*6 PT;
+ String idxstr = (decresc)? "decrescendosym" : "crescendosym";
+ ret=(*symtables_p_)("param")->lookup (idxstr);
+
+ Array<String> a;
+ a.push (idx);
+ ret.tex_ = substitute_args (ret.tex_, a);
+ }
+
+ ret.dim_.x() = Interval (0,wid);
+ // ret.translate_axis (-ret.dim_[Y_AXIS][DOWN], Y_AXIS);
+ return ret;