//>>built
define("dojox/gfx/_base","dojo/_base/kernel,dojo/_base/lang,dojo/_base/Color,dojo/_base/sniff,dojo/_base/window,dojo/_base/array,dojo/dom,dojo/dom-construct,dojo/dom-geometry".split(","),function(n,f,k,l,h,o,p,m,q){var e=f.getObject("dojox.gfx",!0),g=e._base={};e._hasClass=function(a,c){var b=a.getAttribute("className");return b&&0<=(" "+b+" ").indexOf(" "+c+" ")};e._addClass=function(a,c){var b=a.getAttribute("className")||"";if(!b||0>(" "+b+" ").indexOf(" "+c+" "))a.setAttribute("className",b+(b?
" ":"")+c)};e._removeClass=function(a,c){var b=a.getAttribute("className");b&&a.setAttribute("className",b.replace(RegExp("(^|\\s+)"+c+"(\\s+|$)"),"$1$2"))};g._getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},c,b;if(l("ie")&&(b=h.doc.documentElement.style.fontSize||"",!b))h.doc.documentElement.style.fontSize="100%";var d=m.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",
height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},h.body());for(c in a)d.style.fontSize=c,a[c]=16*Math.round(12*d.offsetHeight/16)/12/1E3;if(l("ie"))h.doc.documentElement.style.fontSize=b;h.body().removeChild(d);return a};var i=null;g._getCachedFontMeasurements=function(a){if(a||!i)i=g._getFontMeasurements();return i};var j=null,r={};g._getTextBox=function(a,c,b){var d,e,g=arguments.length,f;j||(j=m.create("div",{style:{position:"absolute",top:"-10000px",
left:"0"}},h.body()));d=j;d.className="";e=d.style;e.borderWidth="0";e.margin="0";e.padding="0";e.outline="0";if(1<g&&c)for(f in c)f in r||(e[f]=c[f]);if(2<g&&b)d.className=b;d.innerHTML=a;return d.getBoundingClientRect?(d=d.getBoundingClientRect(),{l:d.left,t:d.top,w:d.width||d.right-d.left,h:d.height||d.bottom-d.top}):q.getMarginBox(d)};var s=0;g._getUniqueId=function(){var a;do a=n._scopeName+"xUnique"+ ++s;while(p.byId(a));return a};f.mixin(e,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",
points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",
color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var a={};return function(c){var b=
a[c];if(b)return new b;b=a[c]=new Function;b.prototype=e["default"+c];return new b}}(),normalizeColor:function(a){return a instanceof k?a:new k(a)},normalizeParameters:function(a,c){var b;if(c){var d={};for(b in a)b in c&&!(b in d)&&(a[b]=c[b])}return a},makeParameters:function(a,c){var b=null;if(!c)return f.delegate(a);var d={};for(b in a)b in d||(d[b]=f.clone(b in c?c[b]:a[b]));return d},formatNumber:function(a,c){var b=a.toString();if(0<=b.indexOf("e"))b=a.toFixed(4);else{var d=b.indexOf(".");
0<=d&&5<b.length-d&&(b=a.toFixed(4))}return 0>a?b:c?" "+b:b},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(a){var c=e.getDefault("Font"),a=a.split(/\s+/);if(!(5>a.length)){c.style=a[0];c.variant=a[1];c.weight=a[2];var b=a[3].indexOf("/");c.size=0>b?a[3]:a[3].substring(0,b);var d=4;0>b&&("/"==a[4]?d=6:"/"==a[4].charAt(0)&&(d=5));if(d<a.length)c.family=a.slice(d).join(" ")}return c},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return e._base._getCachedFontMeasurements()["12pt"]/
12},pt2px:function(a){return a*e.px_in_pt()},px2pt:function(a){return a/e.px_in_pt()},normalizedLength:function(a){if(0===a.length)return 0;if(2<a.length){var c=e.px_in_pt(),b=parseFloat(a);switch(a.slice(-2)){case "px":return b;case "pt":return b*c;case "in":return 72*b*c;case "pc":return 12*b*c;case "mm":return b*e.mm_in_pt*c;case "cm":return b*e.cm_in_pt*c}}return parseFloat(a)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
equalSources:function(a,c){return a&&c&&a===c},switchTo:function(a){var c="string"==typeof a?e[a]:a;c&&o.forEach("Group,Rect,Ellipse,Circle,Line,Polyline,Image,Text,Path,TextPath,Surface,createSurface,fixTarget".split(","),function(a){e[a]=c[a]})}});return e});