/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{deg2rad as t}from"../../../../core/mathUtils.js";import{fromTranslation as e,scale as i,translate as s,rotate as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{DisplayObject as a}from"../DisplayObject.js";class m extends a{constructor(){super(...arguments),this.items=[]}clear(){for(const t of this.items)t.attached&&(t.resources.detach(),t.attached=!1);this.items.length=0}setTransform(t){}updateMatrix(o,a){const m=a.extent.xmin,n=a.extent.ymax,c=[0,0];o.toScreen(c,[m,n]);const x=(a.extent.xmax-a.extent.xmin)/a.size[0]/o.resolution,l=t(o.rotation),{displayViewScreenMat3:p}=this.transforms;e(p,[-1,1,0]),i(p,p,[2/(o.size[0]*o.pixelRatio),-2/(o.size[1]*o.pixelRatio),1]),s(p,p,[c[0],c[1],0]),r(p,p,l),i(p,p,[x*o.pixelRatio,x*o.pixelRatio,1])}_createTransforms(){return{displayViewScreenMat3:o()}}}export{m as FlowDisplayObject};
