//>>built define("dojox/gfx/shape",["./_base","dojo/_base/lang","dojo/_base/declare","dojo/_base/kernel","dojo/_base/sniff","dojo/_base/connect","dojo/_base/array","dojo/dom-construct","dojo/_base/Color","./matrix"],function(g,_1,_2,_3,_4,_5,_6,_7,_8,_9){ var _a=g.shape={}; var _b={}; var _c={}; var _d=0,_e=_4("ie")<9; function _f(_10){ var _11={}; for(var key in _10){ if(_10.hasOwnProperty(key)){ _11[key]=_10[key]; } } return _11; }; _a.register=function(s){ var t=s.declaredClass.split(".").pop(); var i=t in _b?++_b[t]:((_b[t]=0)); var uid=t+i; _c[uid]=s; return uid; }; _a.byId=function(id){ return _c[id]; }; _a.dispose=function(s,_12){ if(_12&&s.children){ for(var i=0;i10000){ _c=_f(_c); _d=0; } }; _a.Shape=_2("dojox.gfx.shape.Shape",null,{constructor:function(){ this.rawNode=null; this.shape=null; this.matrix=null; this.fillStyle=null; this.strokeStyle=null; this.bbox=null; this.parent=null; this.parentMatrix=null; var uid=_a.register(this); this.getUID=function(){ return uid; }; },destroy:function(){ _a.dispose(this); },getNode:function(){ return this.rawNode; },getShape:function(){ return this.shape; },getTransform:function(){ return this.matrix; },getFill:function(){ return this.fillStyle; },getStroke:function(){ return this.strokeStyle; },getParent:function(){ return this.parent; },getBoundingBox:function(){ return this.bbox; },getTransformedBoundingBox:function(){ var b=this.getBoundingBox(); if(!b){ return null; } var m=this._getRealMatrix(),gm=_9; return [gm.multiplyPoint(m,b.x,b.y),gm.multiplyPoint(m,b.x+b.width,b.y),gm.multiplyPoint(m,b.x+b.width,b.y+b.height),gm.multiplyPoint(m,b.x,b.y+b.height)]; },getEventSource:function(){ return this.rawNode; },setClip:function(_13){ this.clip=_13; },getClip:function(){ return this.clip; },setShape:function(_14){ this.shape=g.makeParameters(this.shape,_14); this.bbox=null; return this; },setFill:function(_15){ if(!_15){ this.fillStyle=null; return this; } var f=null; if(typeof (_15)=="object"&&"type" in _15){ switch(_15.type){ case "linear": f=g.makeParameters(g.defaultLinearGradient,_15); break; case "radial": f=g.makeParameters(g.defaultRadialGradient,_15); break; case "pattern": f=g.makeParameters(g.defaultPattern,_15); break; } }else{ f=g.normalizeColor(_15); } this.fillStyle=f; return this; },setStroke:function(_16){ if(!_16){ this.strokeStyle=null; return this; } if(typeof _16=="string"||_1.isArray(_16)||_16 instanceof _8){ _16={color:_16}; } var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_16); s.color=g.normalizeColor(s.color); return this; },setTransform:function(_17){ this.matrix=_9.clone(_17?_9.normalize(_17):_9.identity); return this._applyTransform(); },_applyTransform:function(){ return this; },moveToFront:function(){ var p=this.getParent(); if(p){ p._moveChildToFront(this); this._moveToFront(); } return this; },moveToBack:function(){ var p=this.getParent(); if(p){ p._moveChildToBack(this); this._moveToBack(); } return this; },_moveToFront:function(){ },_moveToBack:function(){ },applyRightTransform:function(_18){ return _18?this.setTransform([this.matrix,_18]):this; },applyLeftTransform:function(_19){ return _19?this.setTransform([_19,this.matrix]):this; },applyTransform:function(_1a){ return _1a?this.setTransform([this.matrix,_1a]):this; },removeShape:function(_1b){ if(this.parent){ this.parent.remove(this,_1b); } return this; },_setParent:function(_1c,_1d){ this.parent=_1c; return this._updateParentMatrix(_1d); },_updateParentMatrix:function(_1e){ this.parentMatrix=_1e?_9.clone(_1e):null; return this._applyTransform(); },_getRealMatrix:function(){ var m=this.matrix; var p=this.parent; while(p){ if(p.matrix){ m=_9.multiply(p.matrix,m); } p=p.parent; } return m; }}); _a._eventsProcessing={connect:function(_1f,_20,_21){ return _5.connect(this.getEventSource(),_1f,_a.fixCallback(this,g.fixTarget,_20,_21)); },disconnect:function(_22){ _5.disconnect(_22); }}; _a.fixCallback=function(_23,_24,_25,_26){ if(!_26){ _26=_25; _25=null; } if(_1.isString(_26)){ _25=_25||_3.global; if(!_25[_26]){ throw (["dojox.gfx.shape.fixCallback: scope[\"",_26,"\"] is null (scope=\"",_25,"\")"].join("")); } return function(e){ return _24(e,_23)?_25[_26].apply(_25,arguments||[]):undefined; }; } return !_25?function(e){ return _24(e,_23)?_26.apply(_25,arguments):undefined; }:function(e){ return _24(e,_23)?_26.apply(_25,arguments||[]):undefined; }; }; _1.extend(_a.Shape,_a._eventsProcessing); _a.Container={_init:function(){ this.children=[]; },openBatch:function(){ },closeBatch:function(){ },add:function(_27){ var _28=_27.getParent(); if(_28){ _28.remove(_27,true); } this.children.push(_27); return _27._setParent(this,this._getRealMatrix()); },remove:function(_29,_2a){ for(var i=0;it.x){ _40.l=t.x; } if(_40.rt.y){ _40.t=t.y; } if(_40.b