-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprograma.html
More file actions
39 lines (33 loc) · 844 Bytes
/
Copy pathprograma.html
File metadata and controls
39 lines (33 loc) · 844 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
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<canvas width="600" height="400"></canvas>
<meta charset="UTF-8">
<script>
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "grey"
pincel.fillRect(0,0,600,400);
pincel.fillStyle = "blue"
pincel.fillRect(0,0,200,400);
pincel.fillStyle = "white"
pincel.fillRect(200,0,200,400);
pincel.fillStyle = "red"
pincel.fillRect(400,0,200,400);
pincel.fillStyle= "yellow";
pincel.beginPath();
pincel.moveTo(300,200);
pincel.lineTo(200,400);
pincel.lineTo(400,400);
pincel.fill();
pincel.fillStyle = "green";
pincel.beginPath();
pincel.arc(300,200,100,0,2*3.1416);
pincel.fill();
</script>
</body>
</html>