/
GraphicalLine.ts
40 lines (36 loc) · 1.08 KB
/
GraphicalLine.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {OutlineAndFillStyleEnum} from "./DrawingEnums";
import {PointF2D} from "../../Common/DataObjects/PointF2D";
export class GraphicalLine {
constructor(start: PointF2D, end: PointF2D, width: number = 0,
styleEnum: OutlineAndFillStyleEnum = OutlineAndFillStyleEnum.BaseWritingColor,
colorHex: string = undefined) {
this.start = start;
this.end = end;
this.width = width;
this.styleId = <number>styleEnum;
this.colorHex = colorHex;
}
public styleId: number;
private start: PointF2D;
private end: PointF2D;
private width: number;
public colorHex: string; // will override styleId if not undefined
public get Start(): PointF2D {
return this.start;
}
public set Start(value: PointF2D) {
this.start = value;
}
public get End(): PointF2D {
return this.end;
}
public set End(value: PointF2D) {
this.end = value;
}
public get Width(): number {
return this.width;
}
public set Width(value: number) {
this.width = value;
}
}