text: /*! wPaint - v2.5.0 - 2018-09-26 */
  !function(t){var e="plugins/shapes/img/icons-menu-main-shapes.png";t.extend(!0,t.fn.wPaint.menus.main.items,{rectangle:{group:"shapes"},roundedRect:{icon:"activate",group:"shapes",title:"Rounded Rectangle",img:e,index:0,callback:function(){this.setMode("roundedRect")}},square:{icon:"activate",group:"shapes",title:"Square",img:e,index:1,callback:function(){this.setMode("square")}},roundedSquare:{icon:"activate",group:"shapes",title:"Rounded Square",img:e,index:2,callback:function(){this.setMode("roundedSquare")}},diamond:{icon:"activate",group:"shapes",title:"Diamond",img:e,index:4,callback:function(){this.setMode("diamond")}},ellipse:{group:"shapes2"},circle:{icon:"activate",group:"shapes2",title:"Circle",img:e,index:3,callback:function(){this.setMode("circle")}},pentagon:{icon:"activate",group:"shapes2",title:"Pentagon",img:e,index:5,callback:function(){this.setMode("pentagon")}},hexagon:{icon:"activate",group:"shapes2",title:"Hexagon",img:e,index:6,callback:function(){this.setMode("hexagon")}}}),t.fn.wPaint.extend({_drawRoundedRectDown:function(t){this._drawShapeDown(t)},_drawRoundedRectMove:function(t){this._drawShapeMove(t);var e=t.w>t.h?t.h/t.w:t.w/t.h;this.ctxTemp.roundedRect(t.x,t.y,t.w,t.h,Math.ceil(e*(t.w*t.h*.001))),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawRoundedRectUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawSquareDown:function(t){this._drawShapeDown(t)},_drawSquareMove:function(t){this._drawShapeMove(t);var e=t.w>t.h?t.h:t.w;this.ctxTemp.rect(t.x,t.y,e,e),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawSquareUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawRoundedSquareDown:function(t){this._drawShapeDown(t)},_drawRoundedSquareMove:function(t){this._drawShapeMove(t);var e=t.w>t.h?t.h:t.w;this.ctxTemp.roundedRect(t.x,t.y,e,e,Math.ceil(e*e*.001)),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawRoundedSquareUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawDiamondDown:function(t){this._drawShapeDown(t)},_drawDiamondMove:function(t){this._drawShapeMove(t),this.ctxTemp.diamond(t.x,t.y,t.w,t.h),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawDiamondUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawCircleDown:function(t){this._drawShapeDown(t)},_drawCircleMove:function(t){this._drawShapeMove(t);var e=t.w>t.h?t.h:t.w;this.ctxTemp.ellipse(t.x,t.y,e,e),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawCircleUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawPentagonDown:function(t){this._drawShapeDown(t)},_drawPentagonMove:function(t){this._drawShapeMove(t),this.ctxTemp.pentagon(t.x,t.y,t.w,t.h),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawPentagonUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawHexagonDown:function(t){this._drawShapeDown(t)},_drawHexagonMove:function(t){this._drawShapeMove(t),this.ctxTemp.hexagon(t.x,t.y,t.w,t.h),this.ctxTemp.stroke(),this.ctxTemp.fill()},_drawHexagonUp:function(t){this._drawShapeUp(t),this._addUndo()},_drawArrowDown:function(t){this._drawShapeDown(t)},_drawArrowMove:function(t){this._drawShapeMove(t);var e=this.canvasTempLeftOriginal,i=this.canvasTempTopOriginal;t.pageX<e&&(t.x=t.x+t.w,t.w=-1*t.w),t.pageY<i&&(t.y=t.y+t.h,t.h=-1*t.h);var n=t.x+t.w,o=t.y+t.h,a=Math.atan2(t.h,t.w);this.ctxTemp.beginPath(),this.ctxTemp.moveTo(t.x,t.y),this.ctxTemp.lineTo(n,o),this.ctxTemp.stroke(),this.ctxTemp.beginPath(),this.ctxTemp.moveTo(n,o),this.ctxTemp.lineTo(n-10*Math.cos(a-Math.PI/7),o-10*Math.sin(a-Math.PI/7)),this.ctxTemp.lineTo(n-10*Math.cos(a+Math.PI/7),o-10*Math.sin(a+Math.PI/7)),this.ctxTemp.lineTo(n,o),this.ctxTemp.lineTo(n-10*Math.cos(a-Math.PI/7),o-10*Math.sin(a-Math.PI/7)),this.ctxTemp.closePath(),this.ctxTemp.stroke()},_drawArrowUp:function(t){this._drawShapeUp(t),this._addUndo()}})}(jQuery),window.CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.diamond=function(t,e,i,n){return!(t&&e&&i&&n)||(this.beginPath(),this.moveTo(t+.5*i,e),this.lineTo(t,e+.5*n),this.lineTo(t+.5*i,e+n),this.lineTo(t+i,e+.5*n),this.lineTo(t+.5*i,e),void this.closePath())}),window.CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.ellipse=function(t,e,i,n){if(!(t&&e&&i&&n))return!0;var o=.5522848,a=i/2*o,h=n/2*o,s=t+i,d=e+n,r=t+i/2,c=e+n/2;this.beginPath(),this.moveTo(t,c),this.bezierCurveTo(t,c-h,r-a,e,r,e),this.bezierCurveTo(r+a,e,s,c-h,s,c),this.bezierCurveTo(s,c+h,r+a,d,r,d),this.bezierCurveTo(r-a,d,t,c+h,t,c),this.closePath()}),window.CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.hexagon=function(t,e,i,n){if(!(t&&e&&i&&n))return!0;this.beginPath(),this.moveTo(t+.5*i,e),this.lineTo(t,e+.225*n),this.lineTo(t,e+.775*n),this.lineTo(t+.5*i,e+n),this.lineTo(t+i,e+.775*n),this.lineTo(t+i,e+.225*n),this.lineTo(t+.5*i,e),this.closePath()}),window.CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.pentagon=function(t,e,i,n){return!(t&&e&&i&&n)||(this.beginPath(),this.moveTo(t+i/2,e),this.lineTo(t,e+.4*n),this.lineTo(t+.2*i,e+n),this.lineTo(t+.8*i,e+n),this.lineTo(t+i,e+.4*n),this.lineTo(t+i/2,e),void this.closePath())}),window.CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.roundedRect=function(t,e,i,n,o){return!(t&&e&&i&&n)||(o||(o=5),this.beginPath(),this.moveTo(t+o,e),this.lineTo(t+i-o,e),this.quadraticCurveTo(t+i,e,t+i,e+o),this.lineTo(t+i,e+n-o),this.quadraticCurveTo(t+i,e+n,t+i-o,e+n),this.lineTo(t+o,e+n),this.quadraticCurveTo(t,e+n,t,e+n-o),this.lineTo(t,e+o),this.quadraticCurveTo(t,e,t+o,e),void this.closePath())});