//>>built
define("dojox/gfx/arc",["./_base","dojo/_base/lang","./matrix"],function(t,v,b){function l(b){var f=Math.cos(b),b=Math.sin(b),c={x:f+4/3*(1-f),y:b-4/3*f*(1-f)/b};return{s:{x:f,y:-b},c1:{x:c.x,y:-c.y},c2:c,e:{x:f,y:b}}}var m=2*Math.PI,p=Math.PI/4,n=Math.PI/8,u=p+n,q=l(n);return t.arc={unitArcAsBezier:l,curvePI4:q,arcAsBezier:function(g,f,c,a,h,j,i,e){var h=Boolean(h),j=Boolean(j),k=b._degToRad(a),a=f*f,o=c*c,d=b.multiplyPoint(b.rotate(-k),{x:(g.x-i)/2,y:(g.y-e)/2}),r=d.x*d.x,s=d.y*d.y,a=Math.sqrt((a*
o-a*s-o*r)/(a*s+o*r));isNaN(a)&&(a=0);a={x:a*f*d.y/c,y:-a*c*d.x/f};h==j&&(a={x:-a.x,y:-a.y});a=b.multiplyPoint([b.translate((g.x+i)/2,(g.y+e)/2),b.rotate(k)],a);f=b.normalize([b.translate(a.x,a.y),b.rotate(k),b.scale(f,c)]);a=b.invert(f);g=b.multiplyPoint(a,g);e=b.multiplyPoint(a,i,e);i=Math.atan2(g.y,g.x);e=Math.atan2(e.y,e.x);a=i-e;j&&(a=-a);0>a?a+=m:a>m&&(a-=m);c=n;e=q;c=j?c:-c;g=[];for(h=a;0<h;h-=p)h<u&&(c=h/2,e=l(c),c=j?c:-c,h=0),d=b.normalize([f,b.rotate(i+c)]),j?(a=b.multiplyPoint(d,e.c1),
k=b.multiplyPoint(d,e.c2),d=b.multiplyPoint(d,e.e)):(a=b.multiplyPoint(d,e.c2),k=b.multiplyPoint(d,e.c1),d=b.multiplyPoint(d,e.s)),g.push([a.x,a.y,k.x,k.y,d.x,d.y]),i+=2*c;return g}}});