(function() {function dist2D(x1,y1,x2,y2) {var dx=x2-x1;var dy=y2-y1;return Math.sqrt(dx*dx+dy*dy);} CanvasRenderingContext2D.prototype.textOverflow="";CanvasRenderingContext2D.prototype.textJustify=false;CanvasRenderingContext2D.prototype.textStrokeMin=0;var state=[];var save=CanvasRenderingContext2D.prototype.save;CanvasRenderingContext2D.prototype.save=function() {state.push({textOverflow:this.textOverflow,textJustify:this.textJustify,textStrokeMin:this.textStrokeMin,});save.call(this);} var restore=CanvasRenderingContext2D.prototype.restore;CanvasRenderingContext2D.prototype.restore=function() {restore.call(this);var s=state.pop();this.textOverflow=s.textOverflow;this.textJustify=s.textJustify;this.textStrokeMin=s.textStrokeMin;} CanvasRenderingContext2D.prototype.textPath=function(text,path) {var di,dpos=0;var pos=2;function pointAt(dl) {if(!di||dpos+di