@scandit/web-datacapture-core
Version:
Scandit Data Capture SDK for the Web
1 lines • 937 B
JavaScript
import {a}from'./chunk-SGL5J2CI.js';var e={fillColor:a.fromJSON("#00000000"),strokeColor:a.fromJSON("#00000000"),strokeWidth:0},i=class l{constructor(o=e.fillColor,t=e.strokeColor,s=e.strokeWidth){this.fill={color:o},this.stroke={color:t,width:s};}static get transparent(){let o=a.fromRGBA(255,255,255,0);return new l(o,o,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}clone(){return new l(this.fillColor,this.strokeColor,this.strokeWidth)}static areEquals(o,t){return o==null||t==null?false:a.areEquals(o.fill.color,t.fill.color)&&a.areEquals(o.stroke.color,t.stroke.color)&&o.stroke.width===t.stroke.width}toJSONObject(){return {fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}static fromJSONObject(o){return new l(a.fromJSON(o.fill.color),a.fromJSON(o.stroke.color),o.stroke.width)}};export{i as a};