MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / TextFormat

Class TextFormat

src/scripting/api/Display/TextField.ts:9–50  ·  view source on GitHub ↗

* TextFormat polyfill for AS3 * @author Jim Chen

Source from the content-addressed store, hash-verified

7 * @author Jim Chen
8 */
9 class TextFormat implements ISerializable {
10 public font:string;
11 public size:number;
12 public color:number;
13 public bold:boolean;
14 public italic:boolean;
15 public underline:boolean;
16
17 constructor(font:string = "SimHei",
18 size:number = 25,
19 color:number = 0xFFFFFF,
20 bold:boolean = false,
21 italic:boolean = false,
22 underline:boolean = false,
23 url:string = "",
24 target:string = "",
25 align:string = "left",
26 leftMargin:number = 0,
27 rightMargin:number = 0,
28 indent:number = 0,
29 leading:number = 0) {
30
31 this.font = font;
32 this.size = size;
33 this.color = color;
34 this.bold = bold;
35 this.italic = italic;
36 this.underline = underline;
37 }
38
39 public serialize():Object {
40 return {
41 "class": "TextFormat",
42 "font": this.font,
43 "size": this.size,
44 "color": this.color,
45 "bold": this.bold,
46 "underline": this.underline,
47 "italic": this.italic
48 };
49 }
50 }
51
52 /**
53 * TextField Polyfill for AS3.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected