a:40:{s:9:"#provides";s:34:"dojox.sketch.PreexistingAnnotation";s:9:"#resource";s:31:"sketch/PreexistingAnnotation.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:23:"dojox.sketch.Annotation";}i:1;a:2:{i:0;s:6:"common";i:1;s:19:"dojox.sketch.Anchor";}}s:44:"dojox.sketch.PreexistingAnnotation.prototype";a:1:{s:7:"summary";s:0:"";}s:56:"dojox.sketch.PreexistingAnnotation.prototype.constructor";a:1:{s:7:"summary";s:0:"";}s:34:"dojox.sketch.PreexistingAnnotation";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"figure";a:1:{s:4:"type";s:0:"";}s:2:"id";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:411:"		ta.Annotation.call(this, figure, id);
		this.transform={dx:0, dy:0};
		this.start={ x:0, y:0 };
		this.end={ x:200, y:200 };
		this.radius=8;
		this.textPosition={ x:196, y:196 };
		this.textOffset=4;
		this.textAlign="end";


		//this.property('label',this.id);
		this.rectShape=null;
		this.labelShape=null;


		this.anchors.start=new ta.Anchor(this, "start");
		this.anchors.end=new ta.Anchor(this, "end");";s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:44:"dojox.sketch.PreexistingAnnotation.transform";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:40:"dojox.sketch.PreexistingAnnotation.start";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:38:"dojox.sketch.PreexistingAnnotation.end";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:41:"dojox.sketch.PreexistingAnnotation.radius";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:47:"dojox.sketch.PreexistingAnnotation.textPosition";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:45:"dojox.sketch.PreexistingAnnotation.textOffset";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:44:"dojox.sketch.PreexistingAnnotation.textAlign";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:44:"dojox.sketch.PreexistingAnnotation.rectShape";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:45:"dojox.sketch.PreexistingAnnotation.labelShape";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:48:"dojox.sketch.PreexistingAnnotation.anchors.start";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:46:"dojox.sketch.PreexistingAnnotation.anchors.end";a:2:{s:8:"instance";s:34:"dojox.sketch.PreexistingAnnotation";s:7:"summary";s:0:"";}s:29:"ta.PreexistingAnnotation.type";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:41:"	p.type=function(){ return 'Preexisting' ";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:32:"ta.PreexistingAnnotation.getType";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:56:"	p.getType=function(){ return ta.PreexistingAnnotation; ";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:29:"ta.PreexistingAnnotation._pos";a:5:{s:4:"type";s:8:"Function";s:6:"source";s:311:"		var x=Math.min(this.start.x, this.end.x);
		var y=Math.min(this.start.y, this.end.y);
		var w=Math.max(this.start.x, this.end.x);
		var h=Math.max(this.start.y, this.end.y);
		this.start={ x:x, y:y };
		this.end={ x:w, y:h };
		this.textPosition={ x:this.end.x-this.textOffset, y:this.end.y-this.textOffset };";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"private";b:1;s:7:"summary";s:0:"";}s:30:"ta.PreexistingAnnotation.start";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:28:"ta.PreexistingAnnotation.end";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:37:"ta.PreexistingAnnotation.textPosition";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:30:"ta.PreexistingAnnotation.apply";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"obj";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1175:"		if(!obj){ return; }
		if(obj.documentElement){ obj=obj.documentElement; }
		this.readCommonAttrs(obj);

		
		for(var i=0; i<obj.childNodes.length; i++){
			var c=obj.childNodes[i];
			if(c.localName=="text"){ 
				this.property('label',c.childNodes.length?c.childNodes[0].nodeValue:'');
			}
			else if(c.localName=="rect"){
				if(c.getAttribute('x')!==null){ this.start.x=parseFloat(c.getAttribute('x'), 10); }
				if(c.getAttribute('width')!==null){ this.end.x=parseFloat(c.getAttribute('width'), 10)+parseFloat(c.getAttribute('x'), 10); }
				if(c.getAttribute('y')!==null){ this.start.y=parseFloat(c.getAttribute('y'), 10); }
				if(c.getAttribute('height')!==null){ this.end.y=parseFloat(c.getAttribute('height'), 10)+parseFloat(c.getAttribute('y'), 10); }
				if(c.getAttribute('r')!==null){ this.radius=parseFloat(c.getAttribute('r'),10); }
				var stroke=this.property('stroke');
				var style=c.getAttribute('style');
				var m=style.match(/stroke:([^;]+);/);
				if(m){
					stroke.color=m[1];
					this.property('fill',m[1]);
				}
				m=style.match(/stroke-width:([^;]+);/);
				if(m){
					stroke.width=m[1];
				}
				this.property('stroke',stroke);
			}
		}";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:32:"ta.PreexistingAnnotation.start.x";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:30:"ta.PreexistingAnnotation.end.x";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:32:"ta.PreexistingAnnotation.start.y";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:30:"ta.PreexistingAnnotation.end.y";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:31:"ta.PreexistingAnnotation.radius";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:35:"ta.PreexistingAnnotation.initialize";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"obj";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:952:"		this.apply(obj);
		this._pos();


		//	create either from scratch or based on the passed node
		this.shape=this.figure.group.createGroup();
		this.shape.getEventSource().setAttribute("id", this.id);
		//if(this.transform.dx || this.transform.dy){ this.shape.setTransform(this.transform); }
		this.rectShape=this.shape.createRect({
				x:this.start.x, 
				y: this.start.y, 
				width: this.end.x-this.start.x, 
				height:this.end.y-this.start.y, 
				r:this.radius
			})
			//.setStroke({color:this.property('fill'), width:1})
			.setFill([255,255,255,0.1]);
		this.rectShape.getEventSource().setAttribute("shape-rendering","crispEdges");
		this.labelShape=this.shape.createText({
				x:this.textPosition.x, 
				y:this.textPosition.y, 
				text:this.property('label'), 
				align:this.textAlign
			})
			//.setFont(font)
			.setFill(this.property('fill'));
		this.labelShape.getEventSource().setAttribute('id',this.id+"-labelShape");
		this.draw();";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:4:"this";}}s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:30:"ta.PreexistingAnnotation.shape";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:34:"ta.PreexistingAnnotation.rectShape";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:35:"ta.PreexistingAnnotation.labelShape";a:2:{s:8:"instance";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:32:"ta.PreexistingAnnotation.destroy";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:193:"		if(!this.shape){ return; }
		this.shape.remove(this.rectShape);
		this.shape.remove(this.labelShape);
		this.figure.group.remove(this.shape);
		this.shape=this.rectShape=this.labelShape=null;";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:32:"ta.PreexistingAnnotation.getBBox";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:229:"		var x=Math.min(this.start.x, this.end.x);
		var y=Math.min(this.start.y, this.end.y);
		var w=Math.max(this.start.x, this.end.x)-x;
		var h=Math.max(this.start.y, this.end.y)-y;
		return { x:x-2, y:y-2, width:w+4, height:h+4 };";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:29:"ta.PreexistingAnnotation.draw";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"obj";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:513:"		this.apply(obj);
		this._pos();
		this.shape.setTransform(this.transform);
		this.rectShape.setShape({
				x:this.start.x, 
				y: this.start.y, 
				width: this.end.x-this.start.x, 
				height:this.end.y-this.start.y, 
				r:this.radius
			})
			//.setStroke({ color:this.property('fill'), width:1 })
			.setFill([255,255,255,0.1]);


		this.labelShape.setShape({ 
				x:this.textPosition.x, 
				y:this.textPosition.y, 
				text:this.property('label') 
			})
			.setFill(this.property('fill'));
		this.zoom();";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:4:"this";}}s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:29:"ta.PreexistingAnnotation.zoom";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"pct";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:228:"		if(this.rectShape){
			pct = pct || this.figure.zoomFactor;
			ta.Annotation.prototype.zoom.call(this,pct);
			pct = dojox.gfx.renderer=='vml'?1:pct;
			this.rectShape.setStroke({color:this.property('fill'), width:1/pct});
		}";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:34:"ta.PreexistingAnnotation.serialize";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:611:"		var s=this.property('stroke');
		return '<g '+this.writeCommonAttrs()+'>'
			+ '<rect style="stroke:'+s.color+';stroke-width:1;fill:none;" '
			+ 'x="' + this.start.x + '" '
			+ 'width="' + (this.end.x-this.start.x) + '" '
			+ 'y="' + this.start.y + '" '
			+ 'height="' + (this.end.y-this.start.y) + '" '
			+ 'rx="' + this.radius + '" '
			+ 'ry="' + this.radius + '" '
			+ ' />'
			+ '<text style="fill:'+s.color+';text-anchor:'+this.textAlign+'" font-weight="bold" '
			+ 'x="' + this.textPosition.x + '" '
			+ 'y="' + this.textPosition.y + '">'
			+ this.property('label')
			+ '</text>'
			+ '</g>';";s:9:"prototype";s:24:"ta.PreexistingAnnotation";s:7:"summary";s:0:"";}s:12:"dojox.sketch";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}