/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{Bitmap as t}from"./Bitmap.js";import{TiledDisplayObject as s}from"./webgl/TiledDisplayObject.js";class r extends s{constructor(e,s,r,i,a,n,o=null){super(e,s,r,i,a,n),this.bitmap=new t(o),this.bitmap.coordScale=[a,n],this.bitmap.once("isReady",()=>this.ready())}destroy(){super.destroy(),this.bitmap.destroy()}beforeRender(e){this.bitmap.beforeRender(e),super.beforeRender(e)}afterRender(e){this.bitmap.afterRender(e),super.afterRender(e)}set stencilRef(e){this.bitmap.stencilRef=e}get stencilRef(){return this.bitmap.stencilRef}_createTransforms(){return{displayViewScreenMat3:e(),tileMat3:e()}}setTransform(e){super.setTransform(e),this.bitmap.transforms.displayViewScreenMat3=this.transforms.displayViewScreenMat3}onAttach(){this.bitmap.stage=this.stage}onDetach(){this.bitmap&&(this.bitmap.stage=null)}}export{r as BitmapTile};
