You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
2.3 KiB
8 lines
2.3 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define(["exports","../CIMCursor","../CurveHelper"],function(r,v,w){function n(a,b){const c=Math.PI;for(;Math.abs(b-a)>c+2E-15;)b=b-a>c?b-2*c:b+2*c;return(a+b)/2}class d{static local(){null===d.instance&&(d.instance=new d);return d.instance}execute(a,b,c,m,e){return new x(a,b,c)}}d.instance=null;class x extends v.PathTransformationCursor{constructor(a,b,c){super(a);this._curveHelper=new w.CurveHelper;this._angleToLine=void 0!==b.angleToLine?b.angleToLine:!0;this._offset=void 0!==b.offset?b.offset* |
|
c:0;this._endPoints=void 0!==b.placeOnEndPoints?b.placeOnEndPoints:!0;this._controlPoints=void 0!==b.placeOnControlPoints?b.placeOnControlPoints:!0;this._regularVertices=void 0!==b.placeOnRegularVertices?b.placeOnRegularVertices:!0;this._tags=[];this._tagIterator=0}processPath(a){this.iteratePath||(this._preparePath(a),this.iteratePath=!0);if(this._tagIterator>=this._tags.length)return this._tagIterator=this._tags.length=0,this.iteratePath=!1,null;a=this._tags[this._tagIterator];this._angleToLine&& |
|
this.internalPlacement.setRotate(a[2]);let b=a[0],c=a[1];if(0!==this._offset){const m=Math.cos(a[2]);b-=this._offset*Math.sin(a[2]);c+=this._offset*m}this.internalPlacement.setTranslate(b,c);this._tagIterator++;return this.internalPlacement}_preparePath(a){this._tagIterator=this._tags.length=0;a.seekPathStart();const b=a.isClosed();let c=0,m=!1,e=0,f=0;a.seekPathStart();if(a.nextPoint()){let g=a.x,h=a.y,p=a.getControlPoint(),t=!0,u=a.nextPoint();for(;u;){const k=a.x,l=a.y,q=a.getControlPoint();if(this._angleToLine|| |
|
0!==this._offset)e=this._curveHelper.getAngle(g,h,k,l,0);t?(t=!1,b?(c=e,m=p):(this._endPoints||this._controlPoints&&p)&&this._tags.push([g,h,e])):p?this._controlPoints&&this._tags.push([g,h,n(f,e)]):this._regularVertices&&this._tags.push([g,h,n(f,e)]);if(this._angleToLine||0!==this._offset)f=this._curveHelper.getAngle(g,h,k,l,1);(u=a.nextPoint())||(b?q||m?this._controlPoints&&this._tags.push([k,l,n(f,c)]):this._regularVertices&&this._tags.push([k,l,n(f,c)]):(this._endPoints||this._controlPoints&& |
|
q)&&this._tags.push([k,l,f]));g=k;h=l;p=q}}this._tagIterator=0}}r.PlacementOnVertices=d;Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}); |