@scandit/web-datacapture-core
Version:
Scandit Data Capture SDK for the Web
1 lines • 1.76 kB
JavaScript
import {a as a$1}from'./chunk-QG3MRQMP.js';import {a as a$2}from'./chunk-AZWFNBVA.js';import {a as a$3}from'./chunk-ENYHCJGH.js';import {a}from'./chunk-SGL5J2CI.js';var s=class{constructor(i,e){this.type="rectangular";this._disabledColor=a.fromRGBA(0,0,0,0);let n=i!=null?i:a$1.RectangularViewfinder.defaultStyle;this._style=a$1.RectangularViewfinder.styles[n].style,this._lineStyle=a$1.RectangularViewfinder.styles[n].lineStyle,this._dimming=a$1.RectangularViewfinder.styles[n].dimming,this._animation=a$1.RectangularViewfinder.styles[n].animation,this.color=a$1.RectangularViewfinder.styles[n].color,this._sizeWithUnitAndAspect=a$1.RectangularViewfinder.styles[n].size,e!==void 0&&(this._lineStyle=e);}get animation(){return this._animation}set animation(i){this._animation=i;}get dimming(){return this._dimming}set dimming(i){this._dimming=i;}get lineStyle(){return this._lineStyle}get sizeWithUnitAndAspect(){return this._sizeWithUnitAndAspect}get style(){return this._style}get disabledColor(){return this._disabledColor}set disabledColor(i){this._disabledColor=i;}setHeightAndAspectRatio(i,e){this._sizeWithUnitAndAspect=a$2.sizeWithHeightAndAspectRatio(i,e);}setShorterDimensionAndAspectRatio(i,e){this._sizeWithUnitAndAspect=a$2.sizeWithShorterDimensionAndAspectRatio(new a$3(i,"fraction"),e);}setSize(i){this._sizeWithUnitAndAspect=a$2.sizeWithWidthAndHeight(i);}setWidthAndAspectRatio(i,e){this._sizeWithUnitAndAspect=a$2.sizeWithWidthAndAspectRatio(i,e);}toJSONObject(){return {type:this.type,color:this.color.toJSON(),style:this.style,lineStyle:this.lineStyle,dimming:this.dimming,animation:this.animation?this.animation.toJSONObject():null,size:this.sizeWithUnitAndAspect.toJSONObject(),disabledColor:this._disabledColor.toJSON()}}};export{s as a};