-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstroke.html
More file actions
29 lines (26 loc) · 911 Bytes
/
stroke.html
File metadata and controls
29 lines (26 loc) · 911 Bytes
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
<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 shape = new createjs.Shape();
shape.graphics.beginStroke("DarkBlue"); // 赤色で描画するように設定
shape.graphics.setStrokeStyle(5);
shape.graphics.drawCircle(0, 0, 100); //半径 100px の円を描画
shape.x = 200; // X 座標 200px の位置に配置
shape.y = 200; // Y 座標 200px の位置に配置
stage.addChild(shape); // 表示リストに追加
// Stageの描画を更新します
stage.update();
}
</script>
</head>
<body>
<canvas id="myCanvas" width="640" height="320"></canvas>
</body>
</html>