HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
// set stage
2
var stage = acgraph.create("container");
3
4
// draw the circle
5
stage.circle(200, 250, 100)
6
.stroke("2 navy")
7
.zIndex(2);
8
9
// draw the triangle
10
stage.path().moveTo(25, 350)
11
.lineTo(200, 50)
12
.lineTo(375, 350)
13
.stroke("2 navy")
14
.zIndex(1)
15
.close();
16
17
// draw the wand in the middle
18
stage.path().moveTo(200,50)
19
.lineTo(200,350)
20
.zIndex(3)
21
.stroke("2 navy");
22
23
// create the text element
24
var textElement = stage.text();
25
textElement.x(30);
26
textElement.y(375);
27
textElement.text("The Deathly Hallows");
28
textElement.fontSize(30);
29
textElement.fontWeight("bold");
30
textElement.color("navy");
31
32
stage.scale(0.8,0.8,0,0);