Lines Matching +full:r +full:- +full:tv

1 // abc2svg - ABC to SVG translator
3 // Copyright (C) 2014-2020 Jean-Francois Moine - LGPL3+
12 function inDs(Ds,K){for(var I=Ds.length-1;0<=I;--I){if("undefined"!=typeof Ds[I][K])
23 …k;case")":N--;if(N<=0)C=false;break;case"\\":C=xchar();switch(C){case"(":break;case")":break;case"…
27 …,"()<>/% \t\n"))throw new Error("Symbol expected, got "+C);var N=member(C,"+-0123456789.");var F="…
28 L=L.join("");if(1==L.length&&member(L,"+-."))N=false;return N?(F?parseFloat(L):parseInt(L,10)):new …
29 … Symbol(xchar());case"{":Self.D++;return new Symbol(xchar());case"}":Self.D--;return new Symbol(xc…
32 …ray(X)&&isQuoted(X)){if(0<X.length){var F=X[0];var R=quote(X.slice(1));if(0<R.length)Es.push([fals…
40-X)};Sd["mul"]=function(){Os.push(Os.pop()*Os.pop())};Sd["div"]=function(){var X=Os.pop();Os.push(…
42 …;Sd["pop"]=function(){Os.pop()};Sd["index"]=function(){Os.push(Os[Os.length-2-Os.pop()])};Sd["roll…
45 if(I<J)X.unshift(Os.pop());else Y.unshift(Os.pop());for(I=0;I<J;I++)Os.push(X.shift());for(I=0;I<N-
46 N[I]=X[I];Os.push(N)}else{var X=Os.length-N;for(var I=0;I<N;I++)
47 …ush(Os.pop().length)};Sd["astore"]=function(){var A=Os.pop();var N=A.length;for(var I=N-1;0<=I;I--)
51 Sd["repeat"]=function Xrepeat(){var B=Os.pop();var N=Os.pop();if(1<N)Es.push([true,N-1,B,Xrepeat]);…
52 while(--N>=0)
54 …end"]=function(){Ds.pop()};Sd["currentdict"]=function(){Os.push(Ds[Ds.length-1])};Sd["where"]=func…
67-e*g,b*g-a*h])};Sd[".mmul"]=function(){var B=Os.pop();var A=Os.pop();var a=A[0];var b=A[1];var d=A…
71 …old="",font_s=0,path;function getorig(){setg(0);return[gcur.xoffs-gcur.xorig,gcur.yoffs-gcur.yorig…
78 …){var x,xtmp=gcur.xoffs,y=gcur.yoffs,_sin=gcur.sin,_cos=gcur.cos;x=xtmp*_cos-y*_sin;y=xtmp*_sin+y*…
94 if(b>0){prop=' font-weight="bold"';j=b;flags=2}
95 if(i>0||o>0){if(i>0){prop+=' font-style="italic"';if(i<j)
97 if(o>0){prop+=' font-style="oblique"';if(o<j)
99 if(j!=100){if(name[j-1]=='-')
100 j--;name=name.slice(0,j)}
102 prop+=' font-weight="normal"';if(!(flags&12)&&(font_n_old.indexOf("Italic")>=0||font_n_old.indexOf(…
103 prop+=' font-style="normal"'}
104 svgbuf+=' font-family="'+name+'"'+
105 prop+' font-size="'+gcur.font_s+'"'}
108 …py=gcur.cy;path='<path d="m'+(gcur.xoffs+gcur.cx).toFixed(1)+' '+(gcur.yoffs-gcur.cy).toFixed(1)+'…
114 Psvg.prototype.strw=strw;function arc(x,y,r,a1,a2,arcn){var x1,y1,x2,y2 argument
116 a1-=360
118 a2-=360;x1=x+r*Math.cos(a1*Math.PI/180);y1=y+r*Math.sin(a1*Math.PI/180)
122 path+='m';path+=(x1-gcur.cx).toFixed(1)+" "+
123 (-(y1-gcur.cy)).toFixed(1)}else{gcur.cx=x1;gcur.cy=y1;path_def()}}else{if(path)
126 if(a1==a2){a2=180-a1;x2=x+r*Math.cos(a2*Math.PI/180);y2=y+r*Math.sin(a2*Math.PI/180);path+='a'+r.to…
128 (x2-x1).toFixed(2)+' '+
129 (y1-y2).toFixed(2)+' '+
130 r.toFixed(2)+' '+r.toFixed(2)+' 0 0 '+
132 (x1-x2).toFixed(2)+' '+
133 (y2-y1).toFixed(2)+'\n';gcur.cx=x1;gcur.cy=y1}else{x2=x+r*Math.cos(a2*Math.PI/180);y2=y+r*Math.sin(…
135 (x2-x1).toFixed(2)+' '+
136 (y1-y2).toFixed(2)+'\n';gcur.cx=x2;gcur.cy=y2}}
138 Psvg.prototype.arcn=function(x,y,r,a1,a2){arc(x,y,r,a1,a2,true)} argument
140 rlineto(gcur.px-gcur.cx,gcur.py-gcur.cy)}
144 (gcur.xoffs+x1).toFixed(1)+" "+(gcur.yoffs-y1).toFixed(1)+" "+
145 (gcur.xoffs+x2).toFixed(1)+" "+(gcur.yoffs-y2).toFixed(1)+" "+
146 (gcur.xoffs+x).toFixed(1)+" "+(gcur.yoffs-y).toFixed(1)+"\n";gcur.cx=x;gcur.cy=y}
147 Psvg.prototype.eofill=function(){path_end();svgbuf+='" fill-rule="evenodd" fill="currentColor"/>\n'}
153 path+="\tv"+(gcur.cy-y).toFixed(1)+"\n"
155 path+="\th"+(x-gcur.cx).toFixed(1)+"\n"
157 path+="\tl"+(x-gcur.cx).toFixed(1)+" "+
158 (gcur.cy-y).toFixed(1)+"\n";gcur.cx=x;gcur.cy=y}
161 (gcur.yoffs-gcur.cy).toFixed(1)+"\n"}else if(g==2){svgbuf+="</text>\n";g=1}}
164 x1.toFixed(1)+" "+(-y1).toFixed(1)+" "+
165 x2.toFixed(1)+" "+(-y2).toFixed(1)+" "+
166 x.toFixed(1)+" "+(-y).toFixed(1)+"\n";gcur.cx+=x;gcur.cy+=y}
169 path+="\tv"+(-y).toFixed(1)+"\n"
174 (-y).toFixed(1)+"\n";gcur.cx+=x;gcur.cy+=y}
176 (-y).toFixed(1)+"\n"}else if(g==2){svgbuf+="</text>\n";g=1}
179-y*_sin;y=xtmp*_sin+y*_cos;gcur.xoffs=x/gcur.xscale;gcur.yoffs=y/gcur.yscale;xtmp=gcur.cx;y=gcur.c…
181 gcur.rotate-=360
182 else if(gcur.rotate<=-180)
184 …*gcur.xscale;gcur.cy=(-x*_sin+gcur.cy*_cos)*gcur.yscale;x=gcur.xoffs;gcur.xoffs=(x*_cos+gcur.yoffs…
190 gcur.dash=' stroke-dashoffset="'+o+'" stroke-dasharray="';i=0
192 if(--n==0)
197 Psvg.prototype.setrgbcolor=function(r,g,b){var rgb=0x1000000+ argument
198 (Math.floor(r*255)<<16)+
211 (gcur.yoffs-y).toFixed(1)+'">';g=2}
220 svgbuf+='" stroke-width="'+gcur.linewidth.toFixed(1);svgbuf+='" stroke="currentColor" fill="none"'+…
221 Psvg.prototype.translate=function(x,y){gcur.xoffs+=x;gcur.yoffs-=y;gcur.cx-=x;gcur.cy-=y}
222 …on(val,x,y){var xy=getorig();ps_flush();abcobj.out_arp((x+xy[0])*abcobj.stv_g().scale,y-xy[1],val)}
223 …on(val,x,y){var xy=getorig();ps_flush();abcobj.out_ltr((x+xy[0])*abcobj.stv_g().scale,y-xy[1],val)}
224 …unction(x,y,gl){var xy=getorig();ps_flush();abcobj.xygl((x+xy[0])*abcobj.stv_g().scale,y-xy[1],gl)}
225 …gl){var xy=getorig();ps_flush();abcobj.out_deco_str((x+xy[0])*abcobj.stv_g().scale,y-xy[1],gl,str)}
226 …gl){var xy=getorig();ps_flush();abcobj.out_deco_val((x+xy[0])*abcobj.stv_g().scale,y-xy[1],gl,val)}
250 if(x>de.x-20)
251 x=de.x-20}
260 …=function(f,x,y,v1,v2){var xy=getorig();ps_flush();f((x+xy[0])*abcobj.stv_g().scale,y-xy[1],v1,v2)}
372 /ft0{(acc-1).svg(xygl)3 .call0}.bdef\n\