blob: 7cc1a50e8407db343f01737f2ea78b55a74afd2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { Component, ComponentNames } from ".";
export class Text extends Component {
public text: string = "";
public fillStyle: string;
public font: string;
public textAlign: CanvasTextAlign;
constructor(
text: string,
fillStyle = "white",
font = "25px scientifica",
textAlign: CanvasTextAlign = "center"
) {
super(ComponentNames.Text);
this.text = text;
this.fillStyle = fillStyle;
this.font = font;
this.textAlign = textAlign;
}
}
|