var font=(ta.Annotation.labelFont)?ta.Annotation.labelFont:{family:"Times", size:"16px"}; this.apply(obj); // calculate the other positions this._rot(); this._pos(); // rotation matrix var rot=this.rotation; if(this.control.x>=this.end.x&&this.control.x<this.start.x) rot+=Math.PI; var tRot=dojox.gfx.matrix.rotate(rot); // draw the shapes 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.pathShape=this.shape.createPath( "M"+this.start.x+","+this.start.y+" Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+" l0,0" ).setStroke(this.property('stroke')); this.arrowheadGroup=this.shape.createGroup().setTransform({ dx:this.start.x, dy:this.start.y }).applyTransform(tRot); this.arrowhead=this.arrowheadGroup.createPath("M0,0 l20,-5 -3,5 3,5 Z").setFill(this.property('fill')); 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'));