-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfive.html
More file actions
83 lines (68 loc) · 2.66 KB
/
Copy pathfive.html
File metadata and controls
83 lines (68 loc) · 2.66 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html>
<title>
</title>
<script>
window.onload = function () {
var drawingSurface = document.getElementById("drawingSurface");
var ctxt = drawingSurface.getContext("2d");
ctxt.beginPath();
ctxt.moveTo(10, 10);
ctxt.lineTo(225, 350);
ctxt.stroke();
ctxt.beginPath();
<!-- ctxt.moveTo(10, 10); -->
<!-- ctxt.lineTo(225, 350); -->
<!-- ctxt.lineTo(300, 10); -->
<!-- ctxt.lineTo(400, 350); -->
<!-- ctxt.lineWidth = 5; -->
<!-- ctxt.strokeStyle = '#0f0'; -->
<!-- ctxt.stroke(); -->
ctxt.beginPath();
ctxt.arc(150,150, 75,0,2 * Math.PI, false);
ctxt.lineWidth = 25;
ctxt.strokeStyle = '#0f0';
ctxt.stroke();
<!-- ctxt.beginPath(); -- >
<!-- ctxt.arc(450, 100, 75, 1.5 * Math.PI , 2 * Math.PI, false); -->
<!-- ctxt .lineWidth = 25; -->
<!-- ctxt.strokeStyle = 'blue'; -->
<!-- ctxt.stroke(); -->
<!-- ctxt.beginPath(); -->
<!-- ctxt.arc(150, 300, 75, 1 * Math.PI, 1.5 * Math.PI, false); -->
<!-- ctxt.lineWidth = 25; -->
<!-- ctxt.strokeStyle = '#0ff'; -->
<!-- ctxt.stroke(); -->
<!-- ctxt.beginPath(); -->
<!-- ctxt.arc(450, 300, 75, .5 * Math.PI, 1 * Math.PI, false); -->
<!-- ctxt.lineWidth = 25; -->
<!-- ctxt.strokeStyle = '#f00'; -->
<!-- ctxt.stroke(); -->
<!-- ctxt.beginPath(); -->
<!-- ctxt.moveTo(10,380); -->
<!-- ctxt.quadraticCurveTo(300,-250,580,380); -->
<!-- ctxt.lineWidth = 25; -->
<!-- ctxt.strokeStyle = '#f00'; -->
<!-- ctxt.stroke(); -->
<!-- var ctxt = drawingSurface.getContext("2d"); -->
<!-- ctxt.lineWidth = 3; -->
ctxt.rect(150, 150, 200, 55);
<!-- var gradient = ctxt.createLinearGradient(150, 150, 200, 125); -->
<!-- gradient.addColorStop(0, "Black"); -->
<!-- gradient.addColorStop(0.5, "Gray"); -->
<!-- gradient.addColorStop(1,"White"); -->
<!-- ctxt.fillStyle = gradient; -->
<!-- ctxt.fill(); -->
ctxt.stroke();
}
</script>
<style>
canvas {
border: 1px solid black;
}
</style>
<body>
<canvas id="drawingSurface" width="600" height="400">
Your browser does not support HTML5.
</canvas>
</body>
</html>