//>>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={}; _a.register=function(s){ var t=s.declaredClass.split(".").pop(); var i=t in _b?++_b[t]:((_b[t]=0)); var _d=t+i; _c[_d]=s; return _d; }; _a.byId=function(id){ return _c[id]; }; _a.dispose=function(s){ delete _c[s.getUID()]; }; _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 _e=_a.register(this); this.getUID=function(){ return _e; }; },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(_f){ this.clip=_f; },getClip:function(){ return this.clip; },setShape:function(_10){ this.shape=g.makeParameters(this.shape,_10); this.bbox=null; return this; },setFill:function(_11){ if(!_11){ this.fillStyle=null; return this; } var f=null; if(typeof (_11)=="object"&&"type" in _11){ switch(_11.type){ case "linear": f=g.makeParameters(g.defaultLinearGradient,_11); break; case "radial": f=g.makeParameters(g.defaultRadialGradient,_11); break; case "pattern": f=g.makeParameters(g.defaultPattern,_11); break; } }else{ f=g.normalizeColor(_11); } this.fillStyle=f; return this; },setStroke:function(_12){ if(!_12){ this.strokeStyle=null; return this; } if(typeof _12=="string"||_1.isArray(_12)||_12 instanceof _8){ _12={color:_12}; } var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_12); s.color=g.normalizeColor(s.color); return this; },setTransform:function(_13){ this.matrix=_9.clone(_13?_9.normalize(_13):_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(_14){ return _14?this.setTransform([this.matrix,_14]):this; },applyLeftTransform:function(_15){ return _15?this.setTransform([_15,this.matrix]):this; },applyTransform:function(_16){ return _16?this.setTransform([this.matrix,_16]):this; },removeShape:function(_17){ if(this.parent){ this.parent.remove(this,_17); } return this; },_setParent:function(_18,_19){ this.parent=_18; return this._updateParentMatrix(_19); },_updateParentMatrix:function(_1a){ this.parentMatrix=_1a?_9.clone(_1a):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(_1b,_1c,_1d){ return _5.connect(this.getEventSource(),_1b,_a.fixCallback(this,g.fixTarget,_1c,_1d)); },disconnect:function(_1e){ _5.disconnect(_1e); }}; _a.fixCallback=function(_1f,_20,_21,_22){ if(!_22){ _22=_21; _21=null; } if(_1.isString(_22)){ _21=_21||_3.global; if(!_21[_22]){ throw (["dojox.gfx.shape.fixCallback: scope[\"",_22,"\"] is null (scope=\"",_21,"\")"].join("")); } return function(e){ return _20(e,_1f)?_21[_22].apply(_21,arguments||[]):undefined; }; } return !_21?function(e){ return _20(e,_1f)?_22.apply(_21,arguments):undefined; }:function(e){ return _20(e,_1f)?_22.apply(_21,arguments||[]):undefined; }; }; _1.extend(_a.Shape,_a._eventsProcessing); _a.Container={_init:function(){ this.children=[]; },openBatch:function(){ },closeBatch:function(){ },add:function(_23){ var _24=_23.getParent(); if(_24){ _24.remove(_23,true); } this.children.push(_23); return _23._setParent(this,this._getRealMatrix()); },remove:function(_25,_26){ for(var i=0;it.x){ _3c.l=t.x; } if(_3c.rt.y){ _3c.t=t.y; } if(_3c.b