-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.html
More file actions
63 lines (53 loc) · 1.68 KB
/
text.html
File metadata and controls
63 lines (53 loc) · 1.68 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<html>
<head>
<meta charset="utf-8" />
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
<script>
window.addEventListener("load", init);
function init() {
// Stageオブジェクトを作成します
var stage = new createjs.Stage("myCanvas");
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textAlign = "center";
text.x = 100;
text.y = 100;
stage.addChild(text);
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textAlign = "start";
text.x = 100;
text.y = 150;
stage.addChild(text);
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textAlign = "end";
text.x = 100;
text.y = 200;
stage.addChild(text);
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textBaseline = "top";
text.x = 100;
text.y = 250;
stage.addChild(text);
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textBaseline = "middle";
text.x = 100;
text.y = 300;
stage.addChild(text);
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textBaseline = "hanging";
text.x = 100;
text.y = 350;
stage.addChild(text);
var text = new createjs.Text("Hello World!", "24px serif", "DarkRed");
text.textBaseline = "hanging";
text.x = 100;
text.y = 400;
text.text = "test";
stage.addChild(text);
stage.update();
}
</script>
</head>
<body>
<canvas id="myCanvas" width="1000" height="1000"></canvas>
</body>
</html>