/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[(typeof (djConfig)!="undefined"&&djConfig.scopeMap&&djConfig.scopeMap[0][1])||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.gfx.arc"],["require","dojox.gfx.matrix"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.gfx.arc"]){_4._hasResource["dojox.gfx.arc"]=true;_4.provide("dojox.gfx.arc");_4.require("dojox.gfx.matrix");(function(){var m=_6.gfx.matrix,_7=function(_8){var _9=Math.cos(_8),_a=Math.sin(_8),p2={x:_9+(4/3)*(1-_9),y:_a-(4/3)*_9*(1-_9)/_a};return {s:{x:_9,y:-_a},c1:{x:p2.x,y:-p2.y},c2:p2,e:{x:_9,y:_a}};},_b=2*Math.PI,_c=Math.PI/4,_d=Math.PI/8,_e=_c+_d,_f=_7(_d);_4.mixin(_6.gfx.arc,{unitArcAsBezier:_7,curvePI4:_f,arcAsBezier:function(_10,rx,ry,_11,_12,_13,x,y){_12=Boolean(_12);_13=Boolean(_13);var _14=m._degToRad(_11),rx2=rx*rx,ry2=ry*ry,pa=m.multiplyPoint(m.rotate(-_14),{x:(_10.x-x)/2,y:(_10.y-y)/2}),_15=pa.x*pa.x,_16=pa.y*pa.y,c1=Math.sqrt((rx2*ry2-rx2*_16-ry2*_15)/(rx2*_16+ry2*_15));if(isNaN(c1)){c1=0;}var ca={x:c1*rx*pa.y/ry,y:-c1*ry*pa.x/rx};if(_12==_13){ca={x:-ca.x,y:-ca.y};}var c=m.multiplyPoint([m.translate((_10.x+x)/2,(_10.y+y)/2),m.rotate(_14)],ca);var _17=m.normalize([m.translate(c.x,c.y),m.rotate(_14),m.scale(rx,ry)]);var _18=m.invert(_17),sp=m.multiplyPoint(_18,_10),ep=m.multiplyPoint(_18,x,y),_19=Math.atan2(sp.y,sp.x),_1a=Math.atan2(ep.y,ep.x),_1b=_19-_1a;if(_13){_1b=-_1b;}if(_1b<0){_1b+=_b;}else{if(_1b>_b){_1b-=_b;}}var _1c=_d,_1d=_f,_1e=_13?_1c:-_1c,_1f=[];for(var _20=_1b;_20>0;_20-=_c){if(_20<_e){_1c=_20/2;_1d=_7(_1c);_1e=_13?_1c:-_1c;_20=0;}var c1,c2,e,M=m.normalize([_17,m.rotate(_19+_1e)]);if(_13){c1=m.multiplyPoint(M,_1d.c1);c2=m.multiplyPoint(M,_1d.c2);e=m.multiplyPoint(M,_1d.e);}else{c1=m.multiplyPoint(M,_1d.c2);c2=m.multiplyPoint(M,_1d.c1);e=m.multiplyPoint(M,_1d.s);}_1f.push([c1.x,c1.y,c2.x,c2.y,e.x,e.y]);_19+=2*_1e;}return _1f;}});})();}}};});