UNPKG

scandit-web-datacapture-core

Version:

Scandit Data Capture SDK for the Web

7 lines (4 loc) 740 B
import { d } from './chunk-5Y4OYXNX.js'; import { n } from './chunk-N4NOODAT.js'; var e=class i{constructor(o=d.Brush.fillColor,r=d.Brush.strokeColor,s=d.Brush.strokeWidth){this.fill={color:o},this.stroke={color:r,width:s};}static get transparent(){let o=n.fromRGBA(255,255,255,0);return new i(o,o,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}static areEquals(o,r){return o==null||r==null?!1:n.areEquals(o.fill.color,r.fill.color)&&n.areEquals(o.stroke.color,r.stroke.color)&&o.stroke.width===r.stroke.width}toJSONObject(){return {fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}}; export { e as a };