UNPKG

basb-cli

Version:
2 lines (1 loc) 762 B
import{_ as t,P as a}from"./index.js";var r=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},e=function(a){function e(t){var r=a.call(this,t)||this;return r.type="sausage",r}return t(e,a),e.prototype.getDefaultShape=function(){return new r},e.prototype.buildPath=function(t,a){var r=a.cx,e=a.cy,n=Math.max(a.r0||0,0),s=Math.max(a.r,0),h=.5*(s-n),i=n+h,c=a.startAngle,o=a.endAngle,u=a.clockwise,M=2*Math.PI,l=u?o-c<M:c-o<M;l||(c=o-(u?M:-M));var p=Math.cos(c),f=Math.sin(c),P=Math.cos(o),g=Math.sin(o);l?(t.moveTo(p*n+r,f*n+e),t.arc(p*i+r,f*i+e,h,-Math.PI+c,c,!u)):t.moveTo(p*s+r,f*s+e),t.arc(r,e,s,c,o,!u),t.arc(P*i+r,g*i+e,h,o-2*Math.PI,o-Math.PI,!u),0!==n&&t.arc(r,e,n,o,c,u)},e}(a);export{e as S};