import {Unit, UnitType} from "../../../drawing/Unit"; import {LineStyleEnum} from "../../../configs/enums"; /** * Created by TonyJiang on 16/8/24. */ export class Stroke{ private _width:Unit = new Unit(1, UnitType.Pixel); private _color:any = 'rgba(0, 0, 0, 1)'; private _style:number = LineStyleEnum.Solid; constructor(){ } clone():Stroke{ const newStroke = new Stroke(); newStroke.width = this.width; newStroke.style = this.style; newStroke.color = this.color; return newStroke; } get width():Unit { return this._width; } set width(value:Unit) { this._width = value; } get color():any { return this._color; } set color(value:any) { this._color = value; } get style():number { return this._style; } set style(value:number) { this._style = value; } }