/*! * @pixi/graphics-extras - v7.3.1 * Compiled Fri, 22 Sep 2023 18:50:32 UTC * * @pixi/graphics-extras is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ (function(v,T){"use strict";function R(e,a,i,o,s){if(s<=0)return this.drawRect(e,a,i,o);const r=Math.min(s,Math.min(i,o)/2),M=e+i,n=a+o,t=[e+r,a,M-r,a,M,a+r,M,n-r,M-r,n,e+r,n,e,n-r,e,a+r];for(let h=t.length-1;h>=2;h-=2)t[h]===t[h-2]&&t[h-1]===t[h-3]&&t.splice(h-1,2);return this.drawPolygon(t)}function p(e,a,i,o,s){if(s===0)return this.drawRect(e,a,i,o);const r=Math.min(i,o)/2,M=Math.min(r,Math.max(-r,s)),n=e+i,t=a+o,h=M<0?-M:0,l=Math.abs(M);return this.moveTo(e,a+l).arcTo(e+h,a+h,e+l,a,l).lineTo(n-l,a).arcTo(n-h,a+h,n,a+l,l).lineTo(n,t-l).arcTo(n-h,t-h,e+i-l,t,l).lineTo(e+l,t).arcTo(e+h,t-h,e,t-l,l).closePath()}function b(e,a,i,o,s=0){o=Math.max(o|0,3);const r=-1*Math.PI/2+s,M=Math.PI*2/o,n=[];for(let t=0;t{const h=t.x-n.x,l=t.y-n.y,c=Math.sqrt(h*h+l*l),u=h/c,y=l/c;return{len:c,nx:u,ny:y}},r=(n,t)=>{n===0?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)};let M=a[a.length-1];for(let n=0;n0&&(d=-1,P=!0);const x=y/2;let f,w=Math.abs(Math.cos(x)*h/Math.sin(x));w>Math.min(c.len/2,u.len/2)?(w=Math.min(c.len/2,u.len/2),f=Math.abs(w*Math.sin(x)/Math.cos(x))):f=h;const g=t.x+u.nx*w+-u.ny*f*d,m=t.y+u.ny*w+u.nx*f*d,I=Math.atan2(c.ny,c.nx)+Math.PI/2*d,D=Math.atan2(u.ny,u.nx)-Math.PI/2*d;n===0&&e.moveTo(g+Math.cos(I)*f,m+Math.sin(I)*f),e.arc(g,m,f,I,D,P),M=t}}function S(e,a,i){var o;const s=(n,t)=>Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2),r=(n,t,h)=>({x:n.x+(t.x-n.x)*h,y:n.y+(t.y-n.y)*h}),M=a.length;for(let n=0;n=Math.PI*2?this.drawCircle(e,a,o).beginHole().drawCircle(e,a,i).endHole():(this.finishPoly(),this.arc(e,a,i,r,s,!0).arc(e,a,o,s,r,!1).finishPoly(),this)}Object.defineProperties(v.Graphics.prototype,{drawTorus:{value:j},drawChamferRect:{value:R},drawFilletRect:{value:p},drawRegularPolygon:{value:b},drawRoundedPolygon:{value:C},drawRoundedShape:{value:F},drawStar:{value:X}})})(PIXI,PIXI); // Disabled to avoid warnings in Chrome (see https://github.com/4ian/GDevelop/pull/3947) // //# sourceMappingURL=graphics-extras.min.js.map