//>>built define(["dojo/_base/declare","dojox/gfx","./ScaleBase","./_circularUtils"],function(t,q,u,d){return t("dojox.dgauges.CircularScale",u,{originX:50,originY:50,radius:50,startAngle:0,endAngle:180,orientation:"clockwise",constructor:function(){this.labelPosition="inside";this.addInvalidatingProperties("originX originY radius startAngle endAngle orientation".split(" "))},_getOrientationNum:function(){return"cclockwise"==this.orientation?-1:1},positionForValue:function(a){var b=d.computeTotalAngle(this.startAngle, this.endAngle,this.orientation);a=this.scaler.positionForValue(a);return d.modAngle(this.startAngle+this._getOrientationNum()*b*a,360)},_positionForTickItem:function(a){var b=d.computeTotalAngle(this.startAngle,this.endAngle,this.orientation);return d.modAngle(this.startAngle+this._getOrientationNum()*b*a.position,360)},valueForPosition:function(a){if(this.positionInRange(a))var b=d.modAngle(this._getOrientationNum()*(a-this.startAngle),360),e=d.computeTotalAngle(this.startAngle,this.endAngle,this.orientation), b=b/e;else b=d.modAngle(this.startAngle-a,360),e=360-b,a=d.modAngle(this.endAngle-a,360),b=Math.min(b,e)=this.startAngle&&a<=this.endAngle:!(a>this.endAngle&&athis.startAngle&&a=this.endAngle&&a<=this.startAngle}, _distance:function(a,b,e,g){return Math.sqrt((e-a)*(e-a)+(g-b)*(g-b))},_layoutLabel:function(a,b,e,g,d,f,k){var l=this._getFont();b=q._base._getTextBox(b,{font:q.makeFontString(q.makeParameters(q.defaultFont,l))}).w;var l=q.normalizedLength(l.size),m=e+Math.cos(f)*d-b/2,n=g-Math.sin(f)*d-l/2,c,p=[];c=m;var h;h=-Math.tan(f)*c+g+Math.tan(f)*e;h>=n&&h<=n+l&&p.push({x:c,y:h});c=m+b;h=-Math.tan(f)*c+g+Math.tan(f)*e;h>=n&&h<=n+l&&p.push({x:c,y:h});c=n;h=-1/Math.tan(f)*c+e+1/Math.tan(f)*g;h>=m&&h<=m+b&& p.push({x:h,y:c});c=n+l;h=-1/Math.tan(f)*c+e+1/Math.tan(f)*g;h>=m&&h<=m+b&&p.push({x:h,y:c});if("inside"==k)for(k=0;k=c){m=e+Math.cos(f)*(d-c)-b/2;n=g-Math.sin(f)*(d-c)-l/2;break}a&&a.setTransform([{dx:m+b/2,dy:n+l}])},refreshRendering:function(){this.inherited(arguments);if(this._gfxGroup&&this.scaler){this.startAngle= d.modAngle(this.startAngle,360);this.endAngle=d.modAngle(this.endAngle,360);this._ticksGroup.clear();for(var a,b,e=this.scaler.computeTicks(),g,r=0;r